From: Pierangelo Masarati Date: Fri, 5 Jan 2007 15:23:39 +0000 (+0000) Subject: unsolicited responses shouldn't necessarily end the connection X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~254 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ce13437deb978adc15fa905232cc314c300c7c3;p=openldap unsolicited responses shouldn't necessarily end the connection --- diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index 21d2658dfb..82686b3c96 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -878,7 +878,11 @@ nextresp2: lr = NULL; } - if ( lc != NULL ) { + /* + * RF 4511 unsolicited (id == 0) responses + * shouldn't necessarily end the connection + */ + if ( lc != NULL && id != 0 ) { #ifdef LDAP_R_COMPILE ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex ); #endif @@ -959,7 +963,7 @@ nextresp2: #ifdef LDAP_R_COMPILE ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex ); #endif - *lcp = NULL; + lc = *lcp = NULL; } /* need to return -1, because otherwise