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
This commit is contained in:
Guy Harris 2002-03-02 21:51:52 +00:00
parent 09ed04f29b
commit dae2c9c510
1 changed files with 3 additions and 2 deletions

View File

@ -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 <gerald@ethereal.com>
@ -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);