]> git.sur5r.net Git - openldap/commitdiff
unsolicited responses shouldn't necessarily end the connection
authorPierangelo Masarati <ando@openldap.org>
Fri, 5 Jan 2007 15:23:39 +0000 (15:23 +0000)
committerPierangelo Masarati <ando@openldap.org>
Fri, 5 Jan 2007 15:23:39 +0000 (15:23 +0000)
libraries/libldap/result.c

index 21d2658dfb00ff40b6c43a542032d40b0d1e651d..82686b3c963cd1a41078c138a9972eabd44512cb 100644 (file)
@@ -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