diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-10-08 09:29:48 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-10-08 09:29:48 +0000 |
commit | 138a12ce6030cd94d381aac4add8a699cc357e68 (patch) | |
tree | 303710a853457a5e232f639331c70dbce129301c /packet-ipx.c | |
parent | 488f1216ad8ab1caf6048fcc5aaad5620810b7b3 (diff) | |
download | wireshark-138a12ce6030cd94d381aac4add8a699cc357e68.tar.gz |
Set the Info column in the SPX dissector regardless of whether we're
building a protocol tree or not.
Fix up white space.
svn path=/trunk/; revision=6378
Diffstat (limited to 'packet-ipx.c')
-rw-r--r-- | packet-ipx.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packet-ipx.c b/packet-ipx.c index 338fc4ccc9..f6e343f877 100644 --- a/packet-ipx.c +++ b/packet-ipx.c @@ -2,7 +2,7 @@ * Routines for NetWare's IPX * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: packet-ipx.c,v 1.111 2002/09/23 17:14:54 jmayer Exp $ + * $Id: packet-ipx.c,v 1.112 2002/10/08 09:29:48 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -367,13 +367,13 @@ spx_datastream(guint8 type) static void dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - proto_tree *spx_tree; + proto_tree *spx_tree = NULL; proto_item *ti; tvbuff_t *next_tvb; guint8 conn_ctrl; guint8 datastream_type; - const char *spx_msg_string = '\0'; + const char *spx_msg_string = '\0'; if (check_col(pinfo->cinfo, COL_PROTOCOL)) col_set_str(pinfo->cinfo, COL_PROTOCOL, "SPX"); @@ -383,13 +383,17 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { ti = proto_tree_add_item(tree, proto_spx, tvb, 0, SPX_HEADER_LEN, FALSE); spx_tree = proto_item_add_subtree(ti, ett_spx); + } - conn_ctrl = tvb_get_guint8(tvb, 0); - spx_msg_string = spx_conn_ctrl(conn_ctrl); + conn_ctrl = tvb_get_guint8(tvb, 0); + spx_msg_string = spx_conn_ctrl(conn_ctrl); + if (check_col(pinfo->cinfo, COL_INFO)) + col_append_str(pinfo->cinfo, COL_INFO, (gchar*) spx_msg_string); + if (tree) { proto_tree_add_uint_format(spx_tree, hf_spx_connection_control, tvb, 0, 1, conn_ctrl, "Connection Control: %s (0x%02X)", - spx_conn_ctrl(conn_ctrl), conn_ctrl); + spx_msg_string, conn_ctrl); datastream_type = tvb_get_guint8(tvb, 1); proto_tree_add_uint_format(spx_tree, hf_spx_datastream_type, tvb, @@ -402,8 +406,6 @@ dissect_spx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(spx_tree, hf_spx_seq_nr, tvb, 6, 2, FALSE); proto_tree_add_item(spx_tree, hf_spx_ack_nr, tvb, 8, 2, FALSE); proto_tree_add_item(spx_tree, hf_spx_all_nr, tvb, 10, 2, FALSE); - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_str(pinfo->cinfo, COL_INFO, (gchar*) spx_msg_string); next_tvb = tvb_new_subset(tvb, SPX_HEADER_LEN, -1, -1); call_dissector(data_handle,next_tvb, pinfo, tree); |