aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-isup.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2011-07-04 20:43:29 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2011-07-04 20:43:29 +0000
commit3c27014ff874b10fbea740e45133d7e71515fee7 (patch)
treeeffa01c6d9cef7c2444ed946fb355bc92c8be57d /epan/dissectors/packet-isup.c
parentf9e0a2c306f44eeb0e2e6f759201317bdeeb32b4 (diff)
From Christopher Maynard:
From doc/README.tapping: IF the tap is going to return private data using the last parameter to tap_queue_packet() and IF the protocol can appear multiple times inside the same packet, you will have to make sure that each instance of tap_queue_packet() is using its own instance of private struct variable so they don't overwrite each other. This was the case here, so I changed the static allocation of tap_rec to be ep_alloc'd. I also tried to clean up the Info column a bit. With this patch applied, the graph now shows the APM and ANM correctly instead of 2 ANM's. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5966 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37893 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-isup.c')
-rw-r--r--epan/dissectors/packet-isup.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c
index 8ebd08be64..19add35d23 100644
--- a/epan/dissectors/packet-isup.c
+++ b/epan/dissectors/packet-isup.c
@@ -6946,7 +6946,8 @@ dissect_isup_confusion_message(tvbuff_t *message_tvb, proto_tree *isup_tree)
static void
dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup_tree)
{
- static isup_tap_rec_t tap_rec;
+ isup_tap_rec_t *tap_rec;
+
tvbuff_t *parameter_tvb;
tvbuff_t *optional_parameter_tvb;
proto_item* pass_along_item;
@@ -6975,9 +6976,10 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
}
offset += MESSAGE_TYPE_LENGTH;
- tap_rec.message_type = message_type;
- tap_rec.calling_number = NULL;
- tap_rec.called_number = NULL;
+ tap_rec = (isup_tap_rec_t *)ep_alloc(sizeof(isup_tap_rec_t));
+ tap_rec->message_type = message_type;
+ tap_rec->calling_number = NULL;
+ tap_rec->called_number = NULL;
parameter_tvb = tvb_new_subset_remaining(message_tvb, offset);
@@ -7422,10 +7424,10 @@ dissect_isup_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *isup
proto_tree_add_text(isup_tree, message_tvb, 0, 0, "No optional parameters are possible with this message type");
/* if there are calling/called number, we'll get them for the tap */
- tap_rec.calling_number=tap_calling_number?tap_calling_number:ep_strdup("");
- tap_rec.called_number=tap_called_number;
- tap_rec.cause_value=tap_cause_value;
- tap_queue_packet(isup_tap, pinfo, &tap_rec);
+ tap_rec->calling_number=tap_calling_number?tap_calling_number:ep_strdup("");
+ tap_rec->called_number=tap_called_number;
+ tap_rec->cause_value=tap_cause_value;
+ tap_queue_packet(isup_tap, pinfo, tap_rec);
}
/* ------------------------------------------------------------------ */
@@ -7536,15 +7538,15 @@ dissect_bicc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pinfo->ctype = CT_BICC;
pinfo->circuit_id = bicc_cic;
-
+ col_clear(pinfo->cinfo, COL_INFO);
if (isup_show_cic_in_info) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%s (CIC %u) ",
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ",
+ "%s (CIC %u)",
val_to_str_ext_const(message_type, &isup_message_type_value_acro_ext, "reserved"),
bicc_cic);
} else {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%s ",
+ col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ",
+ "%s",
val_to_str_ext_const(message_type, &isup_message_type_value_acro_ext, "reserved"));
}
/* dissect CIC in main dissector since pass-along message type carrying complete BICC/ISUP message w/o CIC needs
@@ -7563,6 +7565,7 @@ dissect_bicc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
message_tvb = tvb_new_subset_remaining(tvb, BICC_CIC_LENGTH);
dissect_isup_message(message_tvb, pinfo, bicc_tree);
+ col_set_fence(pinfo->cinfo, COL_INFO);
}
static void