aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ncp2222.inc
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-10-10 03:58:47 +0000
committerGuy Harris <guy@alum.mit.edu>2002-10-10 03:58:47 +0000
commitb3af4098d2ab8d4235818994b127c662205c29f0 (patch)
treee3f6afd248e25c3398ce69c5f20a3395d8d9b318 /packet-ncp2222.inc
parent9a4b466497b60044bbe8414f0750b085c4ee3138 (diff)
Don't attach the string for an NDS error to the completion code - attach
the string for the completion code. Do put the string for the NDS error into the summary line, however. Don't clear the NDS error code if we can't translate it to a string. svn path=/trunk/; revision=6400
Diffstat (limited to 'packet-ncp2222.inc')
-rw-r--r--packet-ncp2222.inc38
1 files changed, 8 insertions, 30 deletions
diff --git a/packet-ncp2222.inc b/packet-ncp2222.inc
index 6fa8acf74a..fd082c3c46 100644
--- a/packet-ncp2222.inc
+++ b/packet-ncp2222.inc
@@ -8,7 +8,7 @@
* Gilbert Ramirez <gram@alumni.rice.edu>
* Modified to decode NDS packets by Greg Morris <gmorris@novell.com>
*
- * $Id: packet-ncp2222.inc,v 1.25 2002/10/10 03:25:47 guy Exp $
+ * $Id: packet-ncp2222.inc,v 1.26 2002/10/10 03:58:47 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -4281,22 +4281,22 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
{
nds_offset = 16;
nds_error_code = tvb_get_letohl(tvb, nds_offset);
- error_string = match_strval(nds_error_code, nds_reply_errors);
- if (error_string == NULL)
+ nds_error_string = match_strval(nds_error_code, nds_reply_errors);
+ if (nds_error_string == NULL)
{
nds_offset = 19;
nds_error_code = tvb_get_letohl(tvb, nds_offset);
- error_string = match_strval(nds_error_code, nds_reply_errors);
+ nds_error_string = match_strval(nds_error_code, nds_reply_errors);
}
- if (error_string == NULL || nds_error_code == 0x00000000)
+ if (nds_error_string == NULL || nds_error_code == 0x00000000)
{
if (nds_frag != 0xffffffff)
{
- error_string = "NDS Fragment";
+ nds_error_string = "NDS Fragment";
}
else
{
- error_string = "Ok";
+ nds_error_string = "Ok";
}
}
}
@@ -4311,7 +4311,7 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
}
col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
type == NCP_SERVICE_REPLY ? "R" : "ACK",
- error_string);
+ nds_error_string ? nds_error_string : error_string);
}
if (ncp_tree) {
@@ -4394,31 +4394,9 @@ dissect_ncp_reply(tvbuff_t *tvb, packet_info *pinfo,
nds_frag);
if (nds_reply_buffer > 7)
{
- nds_offset = 16;
- nds_error_code = tvb_get_letohl(tvb, nds_offset);
- nds_error_string = match_strval(nds_error_code, nds_reply_errors);
- if (nds_error_string == NULL)
- {
- nds_offset = 19;
- nds_error_code = tvb_get_letohl(tvb, nds_offset);
- error_string = match_strval(nds_error_code, nds_reply_errors);
- }
- if (nds_error_string == NULL || nds_error_code == 0x00000000)
- {
- if (nds_frag != 0xffffffff)
- {
- nds_error_string = "NDS Fragment";
- }
- else
- {
- nds_error_string = "Ok";
- }
- nds_error_code = 0x00000000;
- }
proto_tree_add_uint_format(ncp_tree, hf_nds_reply_error, tvb, nds_offset,
4, nds_error_code, "NDS Completion Code: 0x%08x, %s",
nds_error_code, nds_error_string);
-
}
if (request_value && nds_error_code == 0x00000000 && nds_frag == 0xffffffff)
{