]> git.sur5r.net Git - openldap/commitdiff
don't assert(0); apparently, other responses may result from a simple bind (but log...
authorPierangelo Masarati <ando@openldap.org>
Wed, 11 Apr 2007 08:57:41 +0000 (08:57 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 11 Apr 2007 08:57:41 +0000 (08:57 +0000)
libraries/libldap/request.c

index f139e647eb05f045d00840ab6e594a59859e23a4..0131b4ef0d612d999f267812d1e5ec511a7a0fc7 100644 (file)
@@ -467,7 +467,10 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb,
                        ++lc->lconn_refcnt;     /* avoid premature free */
                        ld->ld_defconn = lc;
 
-                       Debug( LDAP_DEBUG_TRACE, "anonymous rebind via ldap_bind_s\n", 0, 0, 0);
+                       Debug( LDAP_DEBUG_TRACE,
+                               "anonymous rebind via ldap_sasl_bind(\"\")\n",
+                               0, 0, 0);
+
 #ifdef LDAP_R_COMPILE
                        ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex );
                        ldap_pvt_thread_mutex_unlock( &ld->ld_res_mutex );
@@ -505,7 +508,13 @@ ldap_new_connection( LDAP *ld, LDAPURLDesc **srvlist, int use_ldsb,
                                                break;
 
                                        default:
-                                               assert( 0 );
+                                               Debug( LDAP_DEBUG_TRACE,
+                                                       "ldap_new_connection %p: "
+                                                       "unexpected response %d "
+                                                       "from BIND request id=%d\n",
+                                                       ld, ldap_msgtype( res ), msgid );
+                                               err = -1;
+                                               break;
                                        }
                                }
                        }