aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-03-15 07:03:13 +0000
committerGuy Harris <guy@alum.mit.edu>2001-03-15 07:03:13 +0000
commit56d199c7ff62eab6b942177adf69ff0a2392707b (patch)
tree59dc3d420016aee94d179c31ff3893ef3cb1d023
parenta9659200c1aa9625ad451efc6b7b28ce002ebe5e (diff)
downloadwireshark-56d199c7ff62eab6b942177adf69ff0a2392707b.tar.gz
wireshark-56d199c7ff62eab6b942177adf69ff0a2392707b.tar.bz2
wireshark-56d199c7ff62eab6b942177adf69ff0a2392707b.zip
Clear the Info column before you start dissecting, just in case you
throw an exception. Fix a comment to reflect that the "location", "info", and "make-and-model" fields are optional (CUPS 1.0[.x] didn't put them into its browse packets). svn path=/trunk/; revision=3132
-rw-r--r--packet-cups.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/packet-cups.c b/packet-cups.c
index ca09e47dab..e87dda7fcd 100644
--- a/packet-cups.c
+++ b/packet-cups.c
@@ -5,7 +5,7 @@
* Charles Levert <charles@comm.polymtl.ca>
* Copyright 2001 Charles Levert
*
-* $Id: packet-cups.c,v 1.3 2001/03/15 06:09:19 guy Exp $
+* $Id: packet-cups.c,v 1.4 2001/03/15 07:03:13 guy Exp $
*
*
* This program is free software; you can redistribute it and/or
@@ -166,6 +166,8 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, PROTO_TAG_CUPS);
+ if (check_col(pinfo->fd, COL_INFO))
+ col_clear(pinfo->fd, COL_INFO);
if (tree) {
ti = proto_tree_add_item(tree, proto_cups, tvb, offset,
@@ -174,7 +176,7 @@ dissect_cups(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Format (1450 bytes max.): */
- /* type state uri "location" "info" "make-and-model"\n */
+ /* type state uri ["location" ["info" ["make-and-model"]]]\n */
ptype = get_hex_uint(tvb, offset, &next_offset);
len = next_offset - offset;