X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibldap%2Fsasl.c;h=c7b18ac91dd5a7f633a4e1924e40426ce3c1be2c;hb=3d39ff68a94e4455074707d763138f01aaa1c5b1;hp=5fc48e2155b0dde0fd5a3d38bef0567ca55f46ff;hpb=bec25494fe6b7864b4b430f955590cb46c5ee40d;p=openldap diff --git a/libraries/libldap/sasl.c b/libraries/libldap/sasl.c index 5fc48e2155..c7b18ac91d 100644 --- a/libraries/libldap/sasl.c +++ b/libraries/libldap/sasl.c @@ -191,7 +191,7 @@ ldap_sasl_bind_s( } #endif - if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 ) { + if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) { return( ld->ld_errno ); /* ldap_result sets ld_errno */ } @@ -201,7 +201,7 @@ ldap_sasl_bind_s( rc = ldap_parse_sasl_bind_result( ld, result, &scredp, 0 ); } - if ( rc != LDAP_SUCCESS && rc != LDAP_SASL_BIND_IN_PROGRESS ) { + if ( rc != LDAP_SUCCESS ) { ldap_msgfree( result ); return( rc ); } @@ -347,7 +347,7 @@ ldap_parse_sasl_bind_result( ldap_msgfree( res ); } - return( ld->ld_errno ); + return( LDAP_SUCCESS ); } int