From dae2c9c51032039e33f5ec1f9394018750f4bd65 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 2 Mar 2002 21:51:52 +0000 Subject: [PATCH] As there's nothing to dissect for LDAP_REQ_UNBIND, set "ret" to ASN1_ERR_NOERROR, as you can't have a dissection error if you've dissected nothing. When dissecting a Bind reply, set "ret" to the return value of "dissect_ldap_response_bind()", so errors get reported properly. svn path=/trunk/; revision=4851 --- packet-ldap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packet-ldap.c b/packet-ldap.c index ecbd90fe7f..5f6eed0a6c 100644 --- a/packet-ldap.c +++ b/packet-ldap.c @@ -1,7 +1,7 @@ /* packet-ldap.c * Routines for ldap packet dissection * - * $Id: packet-ldap.c,v 1.38 2002/03/02 21:28:19 guy Exp $ + * $Id: packet-ldap.c,v 1.39 2002/03/02 21:51:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -1138,6 +1138,7 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case LDAP_REQ_UNBIND: /* Nothing to dissect */ + ret = ASN1_ERR_NOERROR; break; case LDAP_REQ_SEARCH: ret = dissect_ldap_request_search(&a, msg_tree); @@ -1161,7 +1162,7 @@ dissect_ldap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ret = dissect_ldap_request_abandon(&a, msg_tree, start, opLen); break; case LDAP_RES_BIND: - dissect_ldap_response_bind(&a, msg_tree); + ret = dissect_ldap_response_bind(&a, msg_tree); break; case LDAP_RES_SEARCH_ENTRY: ret = dissect_ldap_response_search_entry(&a, msg_tree);