]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
ITS#5469
[openldap] / servers / slapd / connection.c
index 99d8edbbdccd5ad24c0e4c1659ff0f54beec3cce..742934113b1af7441130a5b5c0c401f01c2db79b 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2008 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1712,6 +1712,9 @@ connection_resched( Connection *conn )
 {
        Operation *op;
 
+       if( conn->c_writewaiter )
+               return 0;
+
        if( conn->c_conn_state == SLAP_C_CLOSING ) {
                ber_socket_t    sd;
                ber_sockbuf_ctrl( conn->c_sb, LBER_SB_OPT_GET_FD, &sd );
@@ -1723,7 +1726,7 @@ connection_resched( Connection *conn )
                return 0;
        }
 
-       if( conn->c_conn_state != SLAP_C_ACTIVE || conn->c_writewaiter ) {
+       if( conn->c_conn_state != SLAP_C_ACTIVE ) {
                /* other states need different handling */
                return 0;
        }
@@ -1805,13 +1808,14 @@ static int connection_bind_cb( Operation *op, SlapReply *rs )
 
                        /* log authorization identity */
                        Statslog( LDAP_DEBUG_STATS,
-                               "%s BIND dn=\"%s\" mech=%s ssf=%d\n",
+                               "%s BIND dn=\"%s\" mech=%s sasl_ssf=%d ssf=%d\n",
                                op->o_log_prefix,
                                BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
-                               op->o_conn->c_authmech.bv_val, op->orb_ssf, 0 );
+                               op->o_conn->c_authmech.bv_val,
+                               op->orb_ssf, op->o_conn->c_ssf );
 
                        Debug( LDAP_DEBUG_TRACE,
-                               "do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
+                               "do_bind: SASL/%s bind: dn=\"%s\" sasl_ssf=%d\n",
                                op->o_conn->c_authmech.bv_val,
                                BER_BVISNULL( &op->o_conn->c_dn ) ? "<empty>" : op->o_conn->c_dn.bv_val,
                                op->orb_ssf );
@@ -1974,8 +1978,6 @@ connection_fake_destroy(
        conn.c_connid = -1;
        op.o_connid = -1;
 
-       Debug(LDAP_DEBUG_ANY, "connection_fake_destroy: %p\n", eb, 0, 0 );
-
        ber_memfree_x( eb, NULL );
        slapi_int_free_object_extensions( SLAPI_X_EXT_OPERATION, &op );
        slapi_int_free_object_extensions( SLAPI_X_EXT_CONNECTION, &conn );
@@ -2019,7 +2021,6 @@ connection_fake_init(
                if ( ldap_pvt_thread_pool_getkey( ctx, connection_fake_init, &eb,
                        NULL )) {
                        eb = ch_malloc( sizeof( *eb ));
-                       Debug(LDAP_DEBUG_ANY, "connection_fake_init: ctx %p, %p\n", ctx, eb, 0 );
                        slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn );
                        slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
                        eb->eb_conn = conn->c_extensions;