]> git.sur5r.net Git - openldap/commitdiff
reset ld->ld_errno to avoid returning error codes of previously API calls (ITS#5762)
authorRalf Haferkamp <ralf@openldap.org>
Tue, 21 Oct 2008 16:17:41 +0000 (16:17 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Tue, 21 Oct 2008 16:17:41 +0000 (16:17 +0000)
libraries/libldap/pagectrl.c
libraries/libldap/sortctrl.c
libraries/libldap/stctrl.c
libraries/libldap/vlvctrl.c

index 8aac0c892a4ee644b9a7b1896574e5fa1d9a68ee..b090918bd2041f753381e7ae6b949da339857255 100644 (file)
@@ -71,6 +71,7 @@ ldap_create_page_control_value(
 
        value->bv_val = NULL;
        value->bv_len = 0;
+       ld->ld_errno = LDAP_SUCCESS;
 
        if ( cookie == NULL ) {
                cookie = &null_cookie;
index 80faea92e33ec072e5d049c92f5aaca10cb87923..d5b6ac746f440e433a0ed6d95d116a5dc2958594 100644 (file)
@@ -304,6 +304,7 @@ ldap_create_sort_control_value(
 
        value->bv_val = NULL;
        value->bv_len = 0;
+       ld->ld_errno = LDAP_SUCCESS;
 
        ber = ldap_alloc_ber_with_options( ld );
        if ( ber == NULL) {
index 8aba9466741fdb1c8465adf6c974a48dadabcb99..d02d2d210f1ca295dab3e7ca2a0b9a16a574e1ee 100644 (file)
@@ -60,6 +60,7 @@ param_error:;
        }
 
        assert( LDAP_VALID( ld ) );
+       ld->ld_errno = LDAP_SUCCESS;
 
        /* check sizes according to I.D. */
        if ( sessionSourceIp == NULL ) {
index d92084148e974c727d69eb6fca36884799bcf521..f0acaf910201f7a1452b2076130d33ca3eacaad5 100644 (file)
@@ -101,6 +101,7 @@ ldap_create_vlv_control_value(
 
        value->bv_val = NULL;
        value->bv_len = 0;
+       ld->ld_errno = LDAP_SUCCESS;
 
        ber = ldap_alloc_ber_with_options( ld );
        if ( ber == NULL ) {