diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-14 16:41:38 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-15 00:43:07 +0000 |
commit | d443db06ccbc25cb998ea87c184497f6b9529848 (patch) | |
tree | ace531df702fce5e1ea57a98f428fcbbc1d79646 /ui/tap-rtp-common.c | |
parent | 9a19d6de54ffaf1a7aa22b5b619c4e4609ccf391 (diff) | |
download | wireshark-d443db06ccbc25cb998ea87c184497f6b9529848.tar.gz |
Fix indentation.
Change-Id: I089d18d6dde56c04d75f7c991511728a0a66f699
Reviewed-on: https://code.wireshark.org/review/6540
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui/tap-rtp-common.c')
-rw-r--r-- | ui/tap-rtp-common.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/ui/tap-rtp-common.c b/ui/tap-rtp-common.c index 0623e6ef74..8e5f2c92b0 100644 --- a/ui/tap-rtp-common.c +++ b/ui/tap-rtp-common.c @@ -134,8 +134,8 @@ void rtp_write_header(rtp_stream_info_t *strinfo, FILE *file) strinfo->dest_port); wmem_free(NULL, addr_str); - start_sec = g_htonl(strinfo->start_fd->abs_ts.secs); - start_usec = g_htonl(strinfo->start_fd->abs_ts.nsecs / 1000000); + start_sec = g_htonl(strinfo->start_fd->abs_ts.secs); + start_usec = g_htonl(strinfo->start_fd->abs_ts.nsecs / 1000000); /* rtpdump only accepts guint32 as source, will be fake for IPv6 */ memset(&source, 0, sizeof source); sourcelen = strinfo->src_addr.len; @@ -186,67 +186,67 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con { rtpstream_tapinfo_t *tapinfo = (rtpstream_tapinfo_t *)arg; const struct _rtp_info *rtpinfo = (const struct _rtp_info *)arg2; - rtp_stream_info_t new_stream_info; - rtp_stream_info_t *stream_info = NULL; + rtp_stream_info_t new_stream_info; + rtp_stream_info_t *stream_info = NULL; GList* list; rtp_sample_t sample; struct _rtp_conversation_info *p_conv_data = NULL; /* gather infos on the stream this packet is part of */ - memset(&new_stream_info, 0, sizeof(rtp_stream_info_t)); - COPY_ADDRESS(&(new_stream_info.src_addr), &(pinfo->src)); - new_stream_info.src_port = pinfo->srcport; - COPY_ADDRESS(&(new_stream_info.dest_addr), &(pinfo->dst)); - new_stream_info.dest_port = pinfo->destport; - new_stream_info.ssrc = rtpinfo->info_sync_src; - new_stream_info.payload_type = rtpinfo->info_payload_type; - new_stream_info.payload_type_name = g_strdup(rtpinfo->info_payload_type_str); + memset(&new_stream_info, 0, sizeof(rtp_stream_info_t)); + COPY_ADDRESS(&(new_stream_info.src_addr), &(pinfo->src)); + new_stream_info.src_port = pinfo->srcport; + COPY_ADDRESS(&(new_stream_info.dest_addr), &(pinfo->dst)); + new_stream_info.dest_port = pinfo->destport; + new_stream_info.ssrc = rtpinfo->info_sync_src; + new_stream_info.payload_type = rtpinfo->info_payload_type; + new_stream_info.payload_type_name = g_strdup(rtpinfo->info_payload_type_str); if (tapinfo->mode == TAP_ANALYSE) { /* check whether we already have a stream with these parameters in the list */ list = g_list_first(tapinfo->strinfo_list); while (list) { - if (rtp_stream_info_cmp(&new_stream_info, (rtp_stream_info_t*)(list->data))==0) + if (rtp_stream_info_cmp(&new_stream_info, (rtp_stream_info_t*)(list->data))==0) { - stream_info = (rtp_stream_info_t*)(list->data); /*found!*/ + stream_info = (rtp_stream_info_t*)(list->data); /*found!*/ break; } list = g_list_next(list); } /* not in the list? then create a new entry */ - if (!stream_info) { - new_stream_info.start_fd = pinfo->fd; - new_stream_info.start_rel_time = pinfo->rel_ts; + if (!stream_info) { + new_stream_info.start_fd = pinfo->fd; + new_stream_info.start_rel_time = pinfo->rel_ts; /* reset RTP stats */ - new_stream_info.rtp_stats.first_packet = TRUE; - new_stream_info.rtp_stats.reg_pt = PT_UNDEFINED; + new_stream_info.rtp_stats.first_packet = TRUE; + new_stream_info.rtp_stats.reg_pt = PT_UNDEFINED; /* Get the Setup frame number who set this RTP stream */ p_conv_data = (struct _rtp_conversation_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_get_id_by_filter_name("rtp"), 0); if (p_conv_data) - new_stream_info.setup_frame_number = p_conv_data->frame_number; + new_stream_info.setup_frame_number = p_conv_data->frame_number; else - new_stream_info.setup_frame_number = 0xFFFFFFFF; + new_stream_info.setup_frame_number = 0xFFFFFFFF; - stream_info = g_new(rtp_stream_info_t,1); - *stream_info = new_stream_info; /* memberwise copy of struct */ - tapinfo->strinfo_list = g_list_append(tapinfo->strinfo_list, stream_info); + stream_info = g_new(rtp_stream_info_t,1); + *stream_info = new_stream_info; /* memberwise copy of struct */ + tapinfo->strinfo_list = g_list_append(tapinfo->strinfo_list, stream_info); } /* get RTP stats for the packet */ - rtp_packet_analyse(&(stream_info->rtp_stats), pinfo, rtpinfo); - if (stream_info->rtp_stats.flags & STAT_FLAG_WRONG_TIMESTAMP - || stream_info->rtp_stats.flags & STAT_FLAG_WRONG_SEQ) - stream_info->problem = TRUE; + rtp_packet_analyse(&(stream_info->rtp_stats), pinfo, rtpinfo); + if (stream_info->rtp_stats.flags & STAT_FLAG_WRONG_TIMESTAMP + || stream_info->rtp_stats.flags & STAT_FLAG_WRONG_SEQ) + stream_info->problem = TRUE; /* increment the packets counter for this stream */ - ++(stream_info->packet_count); - stream_info->stop_rel_time = pinfo->rel_ts; + ++(stream_info->packet_count); + stream_info->stop_rel_time = pinfo->rel_ts; /* increment the packets counter of all streams */ ++(tapinfo->npackets); @@ -254,11 +254,11 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con return 1; /* refresh output */ } else if (tapinfo->mode == TAP_SAVE) { - if (rtp_stream_info_cmp(&new_stream_info, tapinfo->filter_stream_fwd)==0) { + if (rtp_stream_info_cmp(&new_stream_info, tapinfo->filter_stream_fwd)==0) { /* XXX - what if rtpinfo->info_all_data_present is FALSE, so that we don't *have* all the data? */ - sample.header.rec_time = nstime_to_msec(&pinfo->fd->abs_ts) - - nstime_to_msec(&tapinfo->filter_stream_fwd->start_fd->abs_ts); + sample.header.rec_time = nstime_to_msec(&pinfo->fd->abs_ts) - + nstime_to_msec(&tapinfo->filter_stream_fwd->start_fd->abs_ts); sample.header.frame_length = rtpinfo->info_data_len; sample.frame = rtpinfo->info_data; rtp_write_sample(&sample, tapinfo->save_file); @@ -267,7 +267,7 @@ int rtpstream_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, con #ifdef __GTK_H__ else if (tapinfo->mode == TAP_MARK) { if (rtp_stream_info_cmp(&tmp_strinfo, tapinfo->filter_stream_fwd)==0 - || rtp_stream_info_cmp(&tmp_strinfo, tapinfo->filter_stream_rev)==0) + || rtp_stream_info_cmp(&tmp_strinfo, tapinfo->filter_stream_rev)==0) { cf_mark_frame(&cfile, pinfo->fd); } @@ -558,7 +558,7 @@ int rtp_packet_analyse(tap_rtp_stat_t *statinfo, if(rtpinfo->info_payload_rate !=0){ clock_rate = rtpinfo->info_payload_rate; }else{ - clock_rate = get_dyn_pt_clock_rate(rtpinfo->info_payload_type_str); + clock_rate = get_dyn_pt_clock_rate(rtpinfo->info_payload_type_str); } } }else{ |