s3: Use tlap_simple_recv in tldap_sasl_bind_recv
authorVolker Lendecke <vl@samba.org>
Sat, 12 Feb 2011 22:49:26 +0000 (23:49 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 13 Feb 2011 11:11:53 +0000 (12:11 +0100)
source3/lib/tldap.c

index 8a3da3cdbea1773e1294af98bcfa4514674cdcfa..1dd380f25962db53538e0740271e891069cee2bd 100644 (file)
@@ -20,6 +20,8 @@
 #include "includes.h"
 #include "tldap.h"
 
+static int tldap_simple_recv(struct tevent_req *req);
+
 bool tevent_req_is_ldap_error(struct tevent_req *req, int *perr)
 {
        enum tevent_req_state state;
@@ -882,12 +884,7 @@ static void tldap_sasl_bind_done(struct tevent_req *subreq)
 
 int tldap_sasl_bind_recv(struct tevent_req *req)
 {
-       int err;
-
-       if (tevent_req_is_ldap_error(req, &err)) {
-               return err;
-       }
-       return TLDAP_SUCCESS;
+       return tldap_simple_recv(req);
 }
 
 int tldap_sasl_bind(struct tldap_context *ld,