From 5ce13437deb978adc15fa905232cc314c300c7c3 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 5 Jan 2007 15:23:39 +0000 Subject: [PATCH] unsolicited responses shouldn't necessarily end the connection --- libraries/libldap/result.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5