]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Pass msg_id into ldap_result
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 11 Dec 2012 14:08:06 +0000 (14:08 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 11 Dec 2012 14:08:06 +0000 (14:08 +0000)
src/modules/rlm_ldap/rlm_ldap.c

index 5931bd1ffbece2cad43126385ec47425186005c3..dd1b6b2fa958d495eb5ec2da70d5cb65aac41dea 100644 (file)
@@ -375,7 +375,7 @@ static int ldap_bind_wrapper(LDAP_CONN **pconn, const char *user,
 
 redo:
        msg_id = ldap_bind(conn->handle, user, password,
-                              LDAP_AUTH_SIMPLE);
+                          LDAP_AUTH_SIMPLE);
        if (msg_id < 0) {
        get_error:
                ldap_get_option(conn->handle, LDAP_OPT_ERROR_NUMBER,
@@ -415,7 +415,7 @@ redo:
 
        tv.tv_sec = inst->timeout;
        tv.tv_usec = 0;
-       rcode = ldap_result(conn->handle, ldap_errno, 1, &tv, &result);
+       rcode = ldap_result(conn->handle, msg_id, 1, &tv, &result);
        if (rcode < 0) goto get_error;
 
        if (rcode == 0) {