aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mgcp.c
diff options
context:
space:
mode:
authorkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2008-09-25 18:32:14 +0000
committerkukosa <kukosa@f5534014-38df-0310-8fa8-9805f1628bb7>2008-09-25 18:32:14 +0000
commit96392ef3fbcfc720ac45670acbd9ef196e53f9a6 (patch)
treeefed7d4a6f3137d6f073b22d38c1e794e8a1680c /epan/dissectors/packet-mgcp.c
parent1066cd46642ad30df2217dec558f55e853ea49e4 (diff)
do not call proto_tree_add_...() inside PROTO_ITEM_SET_HIDDEN() macro
it creates item three times git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26269 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mgcp.c')
-rw-r--r--epan/dissectors/packet-mgcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index 7039d24d86..3f9ae724e5 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -1414,6 +1414,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
gint tvb_current_offset,tvb_previous_offset,tvb_len,tvb_current_len;
gint tokennum, tokenlen;
+ proto_item* hidden_item;
char *transid = NULL;
char *code = NULL;
char *endpointId = NULL;
@@ -1551,7 +1552,8 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
switch (mgcp_type)
{
case MGCP_RESPONSE:
- PROTO_ITEM_SET_HIDDEN(proto_tree_add_boolean(tree, hf_mgcp_rsp, tvb, 0, 0, TRUE));
+ hidden_item = proto_tree_add_boolean(tree, hf_mgcp_rsp, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Check for MGCP response. A response must match a call that
we've seen, and the response must be sent to the same
port and address that the call came from, and must
@@ -1656,7 +1658,8 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb, packet_info *pinfo, proto_tree
}
break;
case MGCP_REQUEST:
- PROTO_ITEM_SET_HIDDEN(proto_tree_add_boolean(tree, hf_mgcp_req, tvb, 0, 0, TRUE));
+ hidden_item = proto_tree_add_boolean(tree, hf_mgcp_req, tvb, 0, 0, TRUE);
+ PROTO_ITEM_SET_HIDDEN(hidden_item);
/* Keep track of the address and port whence the call came,
* and the port to which the call is being sent, so that
* we can match up calls with replies.