]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
added slapi_operation_set_pb
[openldap] / servers / slapd / connection.c
index aeed4237b8da68fc7fdef23307db4d29c1b00e7c..62328798c81de38da6e597c4fe67be1624fb659c 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -395,22 +395,28 @@ long connection_init(
        if( c == NULL ) {
 #ifdef NEW_LOGGING
                LDAP_LOG( CONNECTION, INFO, 
-                          "connection_init: skt %d      connection table full (%d/%d)\n",
-                          s, i, dtblsize );
+                          "connection_init: skt %d connection table full "
+                          "(%d/%d)\n", s, i, dtblsize );
 #else
                Debug( LDAP_DEBUG_ANY,
-                               "connection_init(%d): connection table full (%d/%d)\n",
-                               s, i, dtblsize);
+                               "connection_init(%d): connection table full "
+                               "(%d/%d)\n", s, i, dtblsize);
 #endif
            ldap_pvt_thread_mutex_unlock( &connections_mutex );
            return -1;
        }
-    }
+       }
 #endif
 
-    assert( c != NULL );
+       assert( c != NULL );
 
        if( c->c_struct_state == SLAP_C_UNINITIALIZED ) {
+               c->c_send_ldap_result = slap_send_ldap_result;
+               c->c_send_search_entry = slap_send_search_entry;
+               c->c_send_search_result = slap_send_search_result;
+               c->c_send_search_reference = slap_send_search_reference;
+               c->c_send_ldap_extended = slap_send_ldap_extended;
+
                c->c_authmech.bv_val = NULL;
                c->c_authmech.bv_len = 0;
                c->c_dn.bv_val = NULL;
@@ -1222,16 +1228,20 @@ int connection_read(ber_socket_t s)
 #endif
 
 #define CONNECTION_INPUT_LOOP 1
+/* #define     DATA_READY_LOOP 1 */
 
-#ifdef DATA_READY_LOOP
-       while( !rc && ber_sockbuf_ctrl( c->c_sb, LBER_SB_DATA_READY, NULL ) )
-#elif CONNECTION_INPUT_LOOP
-       while(!rc)
-#endif
+       do
        {
                /* How do we do this without getting into a busy loop ? */
                rc = connection_input( c );
        }
+#ifdef DATA_READY_LOOP
+       while( !rc && ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_DATA_READY, NULL ) );
+#elif CONNECTION_INPUT_LOOP
+       while(!rc);
+#else
+       while(0);
+#endif
 
        if( rc < 0 ) {
 #ifdef NEW_LOGGING