aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mgcp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-22 08:54:08 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-22 08:54:08 +0000
commita4e137f630823d36bcfb8ab402556ca9e6d0d734 (patch)
tree8617f6910eca8b6064b548f3d9cd6357d07843f1 /plugins/mgcp
parentc57c848dfa1f7061ada20fa88ad6eac33ad1ea7c (diff)
Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="
statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. svn path=/trunk/; revision=2932
Diffstat (limited to 'plugins/mgcp')
-rw-r--r--plugins/mgcp/packet-mgcp.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c
index 01504dd234..020b0710e6 100644
--- a/plugins/mgcp/packet-mgcp.c
+++ b/plugins/mgcp/packet-mgcp.c
@@ -2,7 +2,7 @@
* Routines for mgcp packet disassembly
* RFC 2705
*
- * $Id: packet-mgcp.c,v 1.14 2001/01/09 06:32:10 guy Exp $
+ * $Id: packet-mgcp.c,v 1.15 2001/01/22 08:54:08 guy Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
@@ -195,10 +195,6 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint tvb_sectionend,tvb_sectionbegin, tvb_len, tvb_current_len;
tvbuff_t *next_tvb;
- CHECK_DISPLAY_AS_DATA(proto_mgcp, tvb, pinfo, tree);
-
- pinfo->current_proto = "MGCP";
-
/* Initialize variables */
tvb_sectionend = 0;
@@ -207,6 +203,15 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tvb_len = tvb_length(tvb);
tvb_current_len = tvb_len;
+ /*
+ * Set the columns now, so that they'll be set correctly if we throw
+ * an exception. We can set them later as well....
+ */
+ if (check_col(pinfo->fd, COL_PROTOCOL))
+ col_add_str(pinfo->fd, COL_PROTOCOL, "MGCP");
+ if (check_col(pinfo->fd, COL_INFO))
+ col_clear(pinfo->fd, COL_INFO);
+
/*
* Check to see whether we're really dealing with MGCP by looking
* for a valid MGCP verb or response code. This isn't infallible,