]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
Add ability to cache negative results and specify negative TTL on templates
[openldap] / servers / slapd / connection.c
index a83739966d68a597ca37aa11c35ca8bd77d73477..16d9b429fb0fd617e2d31258944e8d986c8c11e9 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1998,7 +1998,6 @@ connection_init_log_prefix( Operation *op )
 static int connection_bind_cb( Operation *op, SlapReply *rs )
 {
        slap_callback *cb = op->o_callback;
-       op->o_callback = cb->sc_next;
 
        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
        op->o_conn->c_conn_state = SLAP_C_ACTIVE;
@@ -2052,7 +2051,7 @@ static int connection_bind_cb( Operation *op, SlapReply *rs )
        }
        ldap_pvt_thread_mutex_unlock( &op->o_conn->c_mutex );
 
-       ch_free( cb );
+       ch_free( op->o_callback );
        op->o_callback = NULL;
 
        return SLAP_CB_CONTINUE;
@@ -2238,6 +2237,11 @@ connection_fake_init(
        op->o_connid = op->o_conn->c_connid;
        connection_init_log_prefix( op );
 
+#ifdef LDAP_SLAPI
+       slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn );
+       slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
+#endif /* LDAP_SLAPI */
+
        slap_op_time( &op->o_time, &op->o_tincr );
 }