]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/error.c
ITS#399: timelimit/timeout handling
[openldap] / libraries / libldap / error.c
index 379e673daf13a6a12ce5d026acdb85875873a594..d1fefd66dfe3b0506b53e679829bc77987dd4027 100644 (file)
@@ -325,10 +325,10 @@ ldap_parse_result(
        }
 
        /* return */
+       if( errcodep != NULL ) {
+               *errcodep = ld->ld_errno;
+       }
        if ( errcode == LDAP_SUCCESS ) {
-               if( errcodep != NULL ) {
-                       *errcodep = ld->ld_errno;
-               }
                if( matcheddnp != NULL ) {
                        *matcheddnp = LDAP_STRDUP( ld->ld_matched );
                }