Ethereal-dev: Re: [Ethereal-dev] New dissector: IAX2 (Inter-Asterisk eXchange 2) VoIP protocol

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

From: Alastair Maw <ethereal@xxxxxxxxx>
Date: Fri, 13 Feb 2004 11:27:47 +0000
Another small fix, to make DTMF digit recognition work properly. Please find attached.

Best regards,

Alastair Maw
Index: packet-iax2.c
===================================================================
RCS file: /cvsroot/ethereal/packet-iax2.c,v
retrieving revision 1.3
diff -u -r1.3 packet-iax2.c
--- packet-iax2.c	27 Jan 2004 20:25:06 -0000	1.3
+++ packet-iax2.c	13 Feb 2004 11:25:19 -0000
@@ -53,7 +53,6 @@
 static int hf_iax2_iseqno = -1;
 static int hf_iax2_type = -1;
 static int hf_iax2_csub = -1;
-static int hf_iax2_dtmf_csub = -1;
 static int hf_iax2_cmd_csub = -1;
 static int hf_iax2_iax_csub = -1;
 static int hf_iax2_voice_csub = -1;
@@ -272,8 +271,7 @@
 	}
       else if (type == AST_FRAME_DTMF)
 	{
-	  proto_tree_add_uint (iax2_tree, hf_iax2_dtmf_csub, tvb,
-			       offset + 11, 1, csub);
+	  proto_tree_add_text (iax2_tree, tvb, offset + 11, 1, "DTMF digit: %c", csub);
 	  if (check_col (pinfo->cinfo, COL_INFO))
 	    {
 	      col_add_fstr (pinfo->cinfo, COL_INFO,
@@ -548,10 +546,6 @@
     {&hf_iax2_csub,
      {"Sub-class", "iax2.subclass", FT_UINT8, BASE_DEC, NULL, 0x0, "",
       HFILL}},
-    {&hf_iax2_dtmf_csub,
-     {"DTMF digit", "iax2.dtmf.digit", FT_UINT8, BASE_DEC, NULL, 0x0,
-      "",
-      HFILL}},
     {&hf_iax2_cmd_csub,
      {"Control type", "iax2.control", FT_UINT8, BASE_DEC,
       VALS (iax_cmd_subclasses), 0x0, "", HFILL}},