Ethereal-dev: [Ethereal-dev] [PATCH] [MTP3] Signalling Link Selector incorrectly presented in

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

From: "Martin van der Werff" <[email protected]>
Date: Sat, 3 Jul 2004 14:28:05 +0200
Hi,

The Signalling Link Selector always shows up as zero for ITU standard MTP3 messages. The patch
below fixes this problem.

Regards, Martin.

--- packet-mtp3.c.prev 2004-07-01 11:35:32.000000000 +0200
+++ packet-mtp3.c 2004-07-03 13:47:36.078125000 +0200
@@ -346,7 +346,6 @@
 dissect_mtp3_routing_label(tvbuff_t *tvb, packet_info *pinfo, proto_tree *mtp3_tree)
 {
   guint32 label, dpc = 0, opc = 0;
-  guint8 sls;
   proto_item *label_item, *label_dpc_item, *label_opc_item;
   proto_tree *label_tree, *label_dpc_tree, *label_opc_tree;
   int *hf_dpc_string;
@@ -359,7 +358,6 @@
     label_tree = proto_item_add_subtree(label_item, ett_mtp3_label);
 
     label = tvb_get_letohl(tvb, ITU_ROUTING_LABEL_OFFSET);
-    sls   = tvb_get_guint8(tvb, ITU_SLS_OFFSET);
 
     opc = (label & ITU_OPC_MASK) >> 14;
     dpc =  label & ITU_DPC_MASK;
@@ -372,7 +370,7 @@
     if (mtp3_pc_structured())
       proto_item_append_text(label_opc_item, " (%s)", mtp3_pc_to_str(opc));
 
-    proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_SLS_OFFSET, ITU_SLS_LENGTH, sls);
+    proto_tree_add_uint(label_tree, hf_mtp3_itu_sls, tvb, ITU_SLS_OFFSET, ITU_SLS_LENGTH, label);
     break;
 
   case ANSI_STANDARD: