aboutsummaryrefslogtreecommitdiffstats
path: root/packet-smb-mailslot.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-19 03:53:33 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-19 03:53:33 +0000
commit294d78cf40e581e6fac22f76179f3c1dd0e1898d (patch)
treef9554e81e50a82f3331f885396f7a7ff0665397c /packet-smb-mailslot.c
parentd8b0767040ac7ec21a2db5aa3972c2b267b1951c (diff)
"dissect_mailslot_browse()", "dissect_mailslot_lanman()", and
"dissect_smb_logon()" always return TRUE, so just get rid of their return value. "call_dissector()" automatically calls the data dissector if the protocol for the dissector being called is disabled, so we don't have to check its result and call the data dissector if it returns 0. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9027 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-smb-mailslot.c')
-rw-r--r--packet-smb-mailslot.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/packet-smb-mailslot.c b/packet-smb-mailslot.c
index ce33a8d922..381fbab32d 100644
--- a/packet-smb-mailslot.c
+++ b/packet-smb-mailslot.c
@@ -2,7 +2,7 @@
* Routines for SMB mailslot packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-smb-mailslot.c,v 1.34 2003/11/16 23:17:21 guy Exp $
+ * $Id: packet-smb-mailslot.c,v 1.35 2003/11/19 03:53:33 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -85,7 +85,6 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
guint16 opcode;
int offset = 0;
int len;
- gboolean dissected;
if (!proto_is_protocol_enabled(find_protocol_by_id(proto_smb_msp))) {
return FALSE;
@@ -184,30 +183,33 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
proto_item_set_len(item, offset);
}
- dissected = FALSE;
switch(trans_subcmd){
case MAILSLOT_BROWSE:
- dissected = call_dissector(mailslot_browse_handle, tvb, pinfo,
+ call_dissector(mailslot_browse_handle, tvb, pinfo,
parent_tree);
break;
+
case MAILSLOT_LANMAN:
- dissected = call_dissector(mailslot_lanman_handle, tvb, pinfo,
+ call_dissector(mailslot_lanman_handle, tvb, pinfo,
parent_tree);
break;
+
case MAILSLOT_NET:
case MAILSLOT_TEMP_NETLOGON:
case MAILSLOT_MSSP:
- dissected = call_dissector(netlogon_handle, tvb, pinfo,
+ call_dissector(netlogon_handle, tvb, pinfo,
parent_tree);
break;
- }
- if (!dissected) {
+
+ default:
/*
- * We dissected the mailslot header, but not the
- * message; dissect the latter as data, but indicate
- * that we successfully dissected the mailslot stuff.
+ * We dissected the mailslot header, but we don't know
+ * how to dissect the message; dissect the latter as data,
+ * but indicate that we successfully dissected the mailslot
+ * stuff.
*/
call_dissector(data_handle,tvb, pinfo, parent_tree);
+ break;
}
return TRUE;
}