Ethereal-dev: [Ethereal-dev] Patch for VoipCalls

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Alejandro Vaquero <alejandrovaquero@xxxxxxxxx>
Date: Wed, 22 Feb 2006 21:48:16 -0700
Hi All,
   find attached a patch for the VoipCalls to fix a couple of issues:
- a problem with the RTP Events (RFC2833) not been handle correctly
- Display the RTP stream in time order when the setup frame is after the RTP stream. - fix a init issue that caused the H245 packet to not been displayed correctly.

Regards
Alejandro

Index: asn1/h245/packet-h245-template.c
===================================================================
--- asn1/h245/packet-h245-template.c	(revision 17375)
+++ asn1/h245/packet-h245-template.c	(working copy)
@@ -72,7 +72,7 @@
 static dissector_handle_t h263_handle = NULL;
 static dissector_handle_t amr_handle = NULL;
 
-static void reset_h245_packet_info(h245_packet_info *pi);
+static void init_h245_packet_info(h245_packet_info *pi);
 static int hf_h245_pdu_type = -1;
 static int hf_h245Manufacturer = -1;
 static int h245_tap = -1;
@@ -316,6 +316,7 @@
 	while ( tvb_length_remaining( tvb, offset>>3 )>0 ){
 		CLEANUP_PUSH(reset_h245_pi, NULL);
 		h245_pi=ep_alloc(sizeof(h245_packet_info));
+		init_h245_packet_info(h245_pi);
 		offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, pinfo ,tr, hf_h245_pdu_type);
 		tap_queue_packet(h245dg_tap, pinfo, h245_pi);
 		offset = (offset+0x07) & 0xfffffff8;
@@ -420,7 +421,7 @@
 	h223_lc_init();
 }
 
-static void reset_h245_packet_info(h245_packet_info *pi)
+static void init_h245_packet_info(h245_packet_info *pi)
 {
         if(pi == NULL) {
                 return;
Index: asn1/h245/h245.cnf
===================================================================
--- asn1/h245/h245.cnf	(revision 17375)
+++ asn1/h245/h245.cnf	(working copy)
@@ -279,7 +279,7 @@
     else
                 g_snprintf(h245_pi->frame_label, 50, "%%s ", val_to_str(value, h245_RequestMessage_short_vals, "UKN"));
 
-    g_snprintf(h245_pi->comment, 50, "%%s %%s ", h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
 
     /* if it is OLC or RM*/
     if ((codec_type != NULL) && (( value == 3) || ( value == 8)))
@@ -307,7 +307,8 @@
 
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%%s %%s ", h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
+
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_BODY IndicationMessage  VAL_PTR = &value
@@ -330,7 +331,8 @@
 	col_set_fence(pinfo->cinfo,COL_INFO);
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%%s %%s ", h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
+
 #.END
 #----------------------------------------------------------------------------------------
 #.FN_BODY CommandMessage  VAL_PTR = &value
@@ -353,7 +355,7 @@
 	col_set_fence(pinfo->cinfo,COL_INFO);
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%%s %%s ", h245_pi->frame_label, val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%%s %%s ", h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
 
 #.END
 #----------------------------------------------------------------------------------------
Index: gtk/graph_analysis.c
===================================================================
--- gtk/graph_analysis.c	(revision 17375)
+++ gtk/graph_analysis.c	(working copy)
@@ -975,8 +975,6 @@
 #else
 		pango_layout_set_text(big_layout, label_string, -1);
 		pango_layout_get_pixel_size(big_layout, &label_width, &label_height);
-        
-        label_width = label_height = 0;
 #endif
 		if (start_arrow<end_arrow){
 			arrow_width = end_arrow-start_arrow;
Index: gtk/voip_calls.c
===================================================================
--- gtk/voip_calls.c	(revision 17375)
+++ gtk/voip_calls.c	(working copy)
@@ -376,37 +376,27 @@
 /* ***************************TAP for RTP Events*****************************/
 /****************************************************************************/
 
+static guint32 rtp_evt_frame_num = 0;
+static guint8 rtp_evt = 0;
+static gboolean rtp_evt_end = FALSE;
+/*static guint32 rtp_evt_setup_frame_num = 0;*/
+
 /****************************************************************************/
 /* whenever a rtp event packet is seen by the tap listener */
 static int 
 rtp_event_packet(void *ptr _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *rtp_event_info)
 {
 	const struct _rtp_event_info *pi = rtp_event_info;
-	voip_rtp_tapinfo_t *tapinfo = &the_tapinfo_rtp_struct;
-	voip_rtp_stream_info_t *tmp_listinfo;
-	voip_rtp_stream_info_t *strinfo = NULL;
-	GList* list;
 
 	/* do not consider RTP events packets without a setup frame */
 	if (pi->info_setup_frame_num == 0){
 		return 0;
 	}
 
-	/* check wether we already have a RTP stream with this setup frame in the list */
-	list = g_list_first(tapinfo->list);
-	while (list)
-	{
-		tmp_listinfo=list->data;
-		if ( (tmp_listinfo->setup_frame_number == pi->info_setup_frame_num) 
-			&& (tmp_listinfo->end_stream == FALSE) && (tmp_listinfo->rtp_event == -1)){
-				strinfo = (voip_rtp_stream_info_t*)(list->data);
-				strinfo->rtp_event = pi->info_rtp_evt;
-				break;
-		}
-		list = g_list_next (list);
-	}
+	rtp_evt_frame_num = pinfo->fd->num;
+	rtp_evt = pi->info_rtp_evt;
+	rtp_evt_end = pi->info_end;
 
-
 	return 0;
 }
 
@@ -500,9 +490,9 @@
 			&& (tmp_listinfo->ssrc == pi->info_sync_src) && (tmp_listinfo->end_stream == FALSE)){
 			/* if the payload type has changed, we mark the stream as finished to create a new one
 			   this is to show multiple payload changes in the Graph for example for DTMF RFC2833 */	   
-			if ( tmp_listinfo->pt != pi->info_payload_type ) 
+			if ( tmp_listinfo->pt != pi->info_payload_type ) {
 				tmp_listinfo->end_stream = TRUE;
-			else {
+			} else {
 				strinfo = (voip_rtp_stream_info_t*)(list->data);
 				break;
 			}
@@ -510,6 +500,11 @@
 		list = g_list_next (list);
 	}
 
+	/* if this is a duplicated RTP Event End, just return */
+	if ((rtp_evt_frame_num == pinfo->fd->num) && !strinfo && (rtp_evt_end == TRUE)) {
+		return 0;
+	}
+
 	/* not in the list? then create a new entry */
 	if (strinfo==NULL){
 		strinfo = g_malloc(sizeof(voip_rtp_stream_info_t));
@@ -543,6 +538,14 @@
 		strinfo->npackets++;
 		strinfo->stop_rel_sec = pinfo->fd->rel_ts.secs;
 		strinfo->stop_rel_usec = pinfo->fd->rel_ts.nsecs/1000;
+
+		/* process RTP Event */
+		if (rtp_evt_frame_num == pinfo->fd->num) {
+			strinfo->rtp_event = rtp_evt;
+			if (rtp_evt_end == TRUE) {
+				strinfo->end_stream = TRUE;
+			}
+		}
 	}
 
 	the_tapinfo_struct.redraw = TRUE;
@@ -572,13 +575,15 @@
 
 		/* using the setup frame number of the RTP stream, we get the call number that it belongs */
 		voip_calls_graph_list = g_list_first(the_tapinfo_struct.graph_analysis->list);
-		item = 0;
 		while (voip_calls_graph_list)
 		{			
 			gai = voip_calls_graph_list->data;
 			conv_num = gai->conv_num;
 			/* if we get the setup frame number, then get the time position to graph the RTP arrow */
 			if (rtp_listinfo->setup_frame_number == gai->frame_num){
+				/* look again from the begining because there are cases where the Setup frame is after the RTP */
+				voip_calls_graph_list = g_list_first(the_tapinfo_struct.graph_analysis->list);
+				item = 0;
 				while(voip_calls_graph_list){
 					gai = voip_calls_graph_list->data;
 					/* if RTP was already in the Graph, just update the comment information */
@@ -613,7 +618,6 @@
 				break;
 			}
 			voip_calls_graph_list = g_list_next(voip_calls_graph_list);
-			item++;
 		}
 		rtp_streams_list = g_list_next(rtp_streams_list);
 	}
Index: epan/dissectors/packet-h245.c
===================================================================
--- epan/dissectors/packet-h245.c	(revision 17375)
+++ epan/dissectors/packet-h245.c	(working copy)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
-/* .\packet-h245.c                                                            */
+/* ./packet-h245.c                                                            */
 /* ../../tools/asn2eth.py -X -e -p h245 -c h245.cnf -s packet-h245-template h245.asn */
 
 /* Input file: packet-h245-template.c */
@@ -80,7 +80,7 @@
 static dissector_handle_t h263_handle = NULL;
 static dissector_handle_t amr_handle = NULL;
 
-static void reset_h245_packet_info(h245_packet_info *pi);
+static void init_h245_packet_info(h245_packet_info *pi);
 static int hf_h245_pdu_type = -1;
 static int hf_h245Manufacturer = -1;
 static int h245_tap = -1;
@@ -2283,7 +2283,7 @@
 
 static int
 dissect_h245_H221NonStandardID(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 682 "h245.cnf"
+#line 684 "h245.cnf"
   t35CountryCode = 0;
   t35Extension = 0;
   manufacturerCode = 0;
@@ -2291,7 +2291,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_H221NonStandardID, H221NonStandardID_sequence);
 
-#line 686 "h245.cnf"
+#line 688 "h245.cnf"
   h221NonStandard = ((t35CountryCode * 256) + t35Extension) * 65536 + manufacturerCode;
   proto_tree_add_uint(tree, hf_h245Manufacturer, tvb, (offset>>3)-4, 4, h221NonStandard);
 
@@ -2316,7 +2316,7 @@
 
 static int
 dissect_h245_NonStandardIdentifier(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 663 "h245.cnf"
+#line 665 "h245.cnf"
 	guint32 value;
 
 	nsiOID = "";
@@ -2351,7 +2351,7 @@
 
 static int
 dissect_h245_T_data(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 697 "h245.cnf"
+#line 699 "h245.cnf"
   tvbuff_t *next_tvb = NULL;
 
   offset = dissect_per_octet_string(tvb, offset, pinfo, tree, hf_index,
@@ -2377,7 +2377,7 @@
 
 static int
 dissect_h245_NonStandardParameter(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 695 "h245.cnf"
+#line 697 "h245.cnf"
   nsp_handle = NULL;
 
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
@@ -2507,7 +2507,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_MasterSlaveDetermination, MasterSlaveDetermination_sequence);
 
-#line 446 "h245.cnf"
+#line 448 "h245.cnf"
 
   h245_pi->msg_type = H245_MastSlvDet;
 
@@ -5292,7 +5292,7 @@
 dissect_h245_T_standard(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
   offset = dissect_per_object_identifier_str(tvb, offset, pinfo, tree, hf_index, &standard_oid_str);
 
-#line 485 "h245.cnf"
+#line 487 "h245.cnf"
   if(!h245_lc_dissector && strcmp(standard_oid_str,"0.0.8.245.1.1.1") == 0)
 	h245_lc_dissector = amr_handle;
 
@@ -5648,7 +5648,7 @@
 
 static int
 dissect_h245_Application(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 379 "h245.cnf"
+#line 381 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -7542,7 +7542,7 @@
 
 static int
 dissect_h245_VideoCapability(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 370 "h245.cnf"
+#line 372 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -7927,7 +7927,7 @@
 
 static int
 dissect_h245_AudioCapability(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 361 "h245.cnf"
+#line 363 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -8571,7 +8571,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_TerminalCapabilitySet, TerminalCapabilitySet_sequence);
 
-#line 461 "h245.cnf"
+#line 463 "h245.cnf"
 
   h245_pi->msg_type = H245_TermCapSet;
 
@@ -9879,7 +9879,7 @@
 
 static int
 dissect_h245_Ipv4_network(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 497 "h245.cnf"
+#line 499 "h245.cnf"
 
   tvbuff_t *value_tvb;
 
@@ -9904,7 +9904,7 @@
 
 static int
 dissect_h245_TsapIdentifier(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 510 "h245.cnf"
+#line 512 "h245.cnf"
   guint32 tsapIdentifier;
 
   offset = dissect_per_constrained_integer(tvb, offset, pinfo, tree, hf_index,
@@ -10223,14 +10223,14 @@
 
 static int
 dissect_h245_T_mediaChannel(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 528 "h245.cnf"
+#line 530 "h245.cnf"
 
 
 	media_channel = TRUE;
 
   offset = dissect_h245_TransportAddress(tvb, offset, pinfo, tree, hf_index);
 
-#line 558 "h245.cnf"
+#line 560 "h245.cnf"
 
 
 	media_channel = FALSE;
@@ -10245,14 +10245,14 @@
 
 static int
 dissect_h245_T_mediaControlChannel(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 540 "h245.cnf"
+#line 542 "h245.cnf"
 
 
 	media_control_channel = TRUE;
 
   offset = dissect_h245_TransportAddress(tvb, offset, pinfo, tree, hf_index);
 
-#line 564 "h245.cnf"
+#line 566 "h245.cnf"
 
 
 	media_control_channel = FALSE;
@@ -10495,7 +10495,7 @@
 
 static int
 dissect_h245_OLC_rev_multiplexParameters(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 614 "h245.cnf"
+#line 616 "h245.cnf"
 
 
 	media_channel = FALSE;
@@ -10506,7 +10506,7 @@
                                  ett_h245_OLC_rev_multiplexParameters, OLC_rev_multiplexParameters_choice,
                                  NULL);
 
-#line 622 "h245.cnf"
+#line 624 "h245.cnf"
 	
 	if (!pinfo->fd->flags.visited) {
 		if (codec_type && (strcmp(codec_type, "t38fax")==0)) {
@@ -10815,7 +10815,7 @@
   }
 
 
-#line 472 "h245.cnf"
+#line 474 "h245.cnf"
 
   if (h245_pi != NULL) h245_pi->msg_type = H245_OpenLogChn;
 
@@ -10890,7 +10890,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_CloseLogicalChannel, CloseLogicalChannel_sequence);
 
-#line 426 "h245.cnf"
+#line 428 "h245.cnf"
 
   h245_pi->msg_type = H245_CloseLogChn;
 
@@ -11461,7 +11461,7 @@
 
 static int
 dissect_h245_VideoMode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 395 "h245.cnf"
+#line 397 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -11824,7 +11824,7 @@
 
 static int
 dissect_h245_AudioMode(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 387 "h245.cnf"
+#line 389 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -11895,7 +11895,7 @@
 
 static int
 dissect_h245_DataModeApplication(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 403 "h245.cnf"
+#line 405 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -12989,7 +12989,7 @@
 
 static int
 dissect_h245_T_subMessageIdentifer(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 490 "h245.cnf"
+#line 492 "h245.cnf"
   guint32 subMessageIdentifer;
 
 
@@ -13107,7 +13107,7 @@
     else
                 g_snprintf(h245_pi->frame_label, 50, "%s ", val_to_str(value, h245_RequestMessage_short_vals, "UKN"));
 
-    g_snprintf(h245_pi->comment, 50, "%s %s ", h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_RequestMessage_vals, "<unknown>"), 50);
 
     /* if it is OLC or RM*/
     if ((codec_type != NULL) && (( value == 3) || ( value == 8)))
@@ -13156,7 +13156,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_MasterSlaveDeterminationAck, MasterSlaveDeterminationAck_sequence);
 
-#line 411 "h245.cnf"
+#line 413 "h245.cnf"
 
   h245_pi->msg_type = H245_MastSlvDetAck;
 
@@ -13200,7 +13200,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_MasterSlaveDeterminationReject, MasterSlaveDeterminationReject_sequence);
 
-#line 416 "h245.cnf"
+#line 418 "h245.cnf"
 
   h245_pi->msg_type = H245_MastSlvDetRjc;
 
@@ -13221,7 +13221,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_TerminalCapabilitySetAck, TerminalCapabilitySetAck_sequence);
 
-#line 441 "h245.cnf"
+#line 443 "h245.cnf"
 
   h245_pi->msg_type = H245_TermCapSetAck;
 
@@ -13297,7 +13297,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_TerminalCapabilitySetReject, TerminalCapabilitySetReject_sequence);
 
-#line 451 "h245.cnf"
+#line 453 "h245.cnf"
 
   h245_pi->msg_type = H245_TermCapSetRjc;
 
@@ -13371,14 +13371,14 @@
 
 static int
 dissect_h245_Ack_mediaChannel(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 522 "h245.cnf"
+#line 524 "h245.cnf"
 
 
 	media_channel = TRUE;
 
   offset = dissect_h245_TransportAddress(tvb, offset, pinfo, tree, hf_index);
 
-#line 546 "h245.cnf"
+#line 548 "h245.cnf"
 
 
 	media_channel = FALSE;
@@ -13393,14 +13393,14 @@
 
 static int
 dissect_h245_Ack_mediaControlChannel(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 534 "h245.cnf"
+#line 536 "h245.cnf"
 
 
 	media_control_channel = TRUE;
 
   offset = dissect_h245_TransportAddress(tvb, offset, pinfo, tree, hf_index);
 
-#line 552 "h245.cnf"
+#line 554 "h245.cnf"
 
 
 	media_control_channel = FALSE;
@@ -13447,7 +13447,7 @@
 
 static int
 dissect_h245_T_forwardMultiplexAckParameters(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 570 "h245.cnf"
+#line 572 "h245.cnf"
 
 
 	media_channel = FALSE;
@@ -13458,7 +13458,7 @@
                                  ett_h245_T_forwardMultiplexAckParameters, T_forwardMultiplexAckParameters_choice,
                                  NULL);
 
-#line 578 "h245.cnf"
+#line 580 "h245.cnf"
 	
 	if (!pinfo->fd->flags.visited) {
 		if (codec_type && strcmp(codec_type, "t38fax")==0) {
@@ -13543,7 +13543,7 @@
   pinfo->p2p_dir = p2p_dir;
 
 
-#line 478 "h245.cnf"
+#line 480 "h245.cnf"
 
   h245_pi->msg_type = H245_OpenLogChnAck;
 
@@ -13614,7 +13614,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_OpenLogicalChannelReject, OpenLogicalChannelReject_sequence);
 
-#line 421 "h245.cnf"
+#line 423 "h245.cnf"
 
   h245_pi->msg_type = H245_OpenLogChnRjc;
 
@@ -13635,7 +13635,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_CloseLogicalChannelAck, CloseLogicalChannelAck_sequence);
 
-#line 431 "h245.cnf"
+#line 433 "h245.cnf"
 
   h245_pi->msg_type = H245_CloseLogChnAck;
 
@@ -14963,9 +14963,10 @@
 
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%s %s ", h245_pi->frame_label, val_to_str(value, h245_ResponseMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%s %s ", h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_ResponseMessage_vals, "<unknown>"), 50);
 
 
+
   return offset;
 }
 static int dissect_response(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
@@ -16144,7 +16145,7 @@
 
 static int
 dissect_h245_CommandMessage(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 337 "h245.cnf"
+#line 339 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -16167,7 +16168,7 @@
 	col_set_fence(pinfo->cinfo,COL_INFO);
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%s %s ", h245_pi->frame_label, val_to_str(value, h245_CommandMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%s %s ", h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_CommandMessage_vals, "<unknown>"), 50);
 
 
 
@@ -16214,7 +16215,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_MasterSlaveDeterminationRelease, MasterSlaveDeterminationRelease_sequence);
 
-#line 456 "h245.cnf"
+#line 458 "h245.cnf"
 
   h245_pi->msg_type = H245_MastSlvDetRls;
 
@@ -16234,7 +16235,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_TerminalCapabilitySetRelease, TerminalCapabilitySetRelease_sequence);
 
-#line 466 "h245.cnf"
+#line 468 "h245.cnf"
 
   h245_pi->msg_type = H245_TermCapSetRls;
 
@@ -16255,7 +16256,7 @@
   offset = dissect_per_sequence(tvb, offset, pinfo, tree, hf_index,
                                    ett_h245_OpenLogicalChannelConfirm, OpenLogicalChannelConfirm_sequence);
 
-#line 436 "h245.cnf"
+#line 438 "h245.cnf"
 
   h245_pi->msg_type = H245_OpenLogChnCnf;
 
@@ -17352,7 +17353,7 @@
 
 static int
 dissect_h245_IndicationMessage(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
-#line 314 "h245.cnf"
+#line 315 "h245.cnf"
   guint32 value;
 
   offset = dissect_per_choice(tvb, offset, pinfo, tree, hf_index,
@@ -17375,9 +17376,10 @@
 	col_set_fence(pinfo->cinfo,COL_INFO);
     /* Add to packet info */
     g_snprintf(h245_pi->frame_label, 50, "%s %s ", h245_pi->frame_label, val_to_str(value, h245_IndicationMessage_short_vals, "UKN"));
-    g_snprintf(h245_pi->comment, 50, "%s %s ", h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"));
+	g_strlcat(h245_pi->comment, val_to_str(value, h245_IndicationMessage_vals, "<unknown>"), 50);
 
 
+
   return offset;
 }
 static int dissect_indication(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {
@@ -17475,6 +17477,7 @@
 	while ( tvb_length_remaining( tvb, offset>>3 )>0 ){
 		CLEANUP_PUSH(reset_h245_pi, NULL);
 		h245_pi=ep_alloc(sizeof(h245_packet_info));
+		init_h245_packet_info(h245_pi);
 		offset = dissect_h245_MultimediaSystemControlMessage(tvb, offset, pinfo ,tr, hf_h245_pdu_type);
 		tap_queue_packet(h245dg_tap, pinfo, h245_pi);
 		offset = (offset+0x07) & 0xfffffff8;
@@ -22906,7 +22909,7 @@
         "Rtp/expirationTime", HFILL }},
 
 /*--- End of included file: packet-h245-hfarr.c ---*/
-#line 350 "packet-h245-template.c"
+#line 351 "packet-h245-template.c"
   };
 
   /* List of subtrees */
@@ -23389,7 +23392,7 @@
     &ett_h245_MobileMultilinkReconfigurationIndication,
 
 /*--- End of included file: packet-h245-ettarr.c ---*/
-#line 356 "packet-h245-template.c"
+#line 357 "packet-h245-template.c"
   };
   module_t *h245_module;
 
@@ -23457,7 +23460,7 @@
 	h223_lc_init();
 }
 
-static void reset_h245_packet_info(h245_packet_info *pi)
+static void init_h245_packet_info(h245_packet_info *pi)
 {
         if(pi == NULL) {
                 return;
Index: epan/dissectors/packet-rtp-events.c
===================================================================
--- epan/dissectors/packet-rtp-events.c	(revision 17375)
+++ epan/dissectors/packet-rtp-events.c	(working copy)
@@ -115,27 +115,33 @@
 		    val_to_str( rtp_evt, rtp_event_type_values, "Unknown (%u)" ));
 	  }
 
-	if ( tree )
-	  {
-	    ti = proto_tree_add_item( tree, proto_rtp_events, tvb, offset, -1, FALSE );
-	    rtp_events_tree = proto_item_add_subtree( ti, ett_rtp_events );
+    ti = proto_tree_add_item( tree, proto_rtp_events, tvb, offset, -1, FALSE );
+    rtp_events_tree = proto_item_add_subtree( ti, ett_rtp_events );
 
-	    proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_event, tvb, offset, 1, rtp_evt);
+    proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_event, tvb, offset, 1, rtp_evt);
 
-	    octet = tvb_get_guint8(tvb, offset +1 );
-	    proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_end, tvb, offset+1, 1, octet);
-	    proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_reserved, tvb, offset+1, 1, octet);
-	    proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_volume, tvb, offset+1, 1, octet);
+    octet = tvb_get_guint8(tvb, offset +1 );
+    proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_end, tvb, offset+1, 1, octet);
+    proto_tree_add_boolean (rtp_events_tree, hf_rtp_events_reserved, tvb, offset+1, 1, octet);
+    proto_tree_add_uint ( rtp_events_tree, hf_rtp_events_volume, tvb, offset+1, 1, octet);
 
-	    proto_tree_add_item ( rtp_events_tree, hf_rtp_events_duration, tvb, offset+2, 2, FALSE);
+    proto_tree_add_item ( rtp_events_tree, hf_rtp_events_duration, tvb, offset+2, 2, FALSE);
 
-	    /* Make end-of-event packets obvious in the info column */
-	    if ((octet & 0x80) && check_col(pinfo->cinfo, COL_INFO))
-	    {
-		    col_append_str(pinfo->cinfo, COL_INFO, " (end)");
-	    }
+	/* set the end info for the tap */
+	if (octet & 0x80)
+	{
+		rtp_event_info.info_end = TRUE;
+	} else
+	{
+		rtp_event_info.info_end = FALSE;
+	}
 
-	  }
+    /* Make end-of-event packets obvious in the info column */
+    if ((octet & 0x80) && check_col(pinfo->cinfo, COL_INFO))
+    {
+	    col_append_str(pinfo->cinfo, COL_INFO, " (end)");
+    }
+
 	tap_queue_packet(rtp_event_tap, pinfo, &rtp_event_info);
 }
 
Index: epan/dissectors/packet-rtp-events.h
===================================================================
--- epan/dissectors/packet-rtp-events.h	(revision 17375)
+++ epan/dissectors/packet-rtp-events.h	(working copy)
@@ -255,5 +255,6 @@
 struct _rtp_event_info {
 	guint8      info_rtp_evt;
 	guint32		info_setup_frame_num; /* the frame num of the packet that set this RTP connection */
+	gboolean	info_end;
 };