From f87a07910f6f086e2c080d84c867f87844bcbe65 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Tue, 26 Jul 2005 09:56:18 +0000 Subject: [PATCH] Support object extensions on internal SLAPI operations --- servers/slapd/slapi/slapi_ops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/servers/slapd/slapi/slapi_ops.c b/servers/slapd/slapi/slapi_ops.c index e39da90300..48403ea872 100644 --- a/servers/slapd/slapi/slapi_ops.c +++ b/servers/slapd/slapi/slapi_ops.c @@ -189,7 +189,6 @@ slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t tag ) op = (Operation *) slapi_ch_calloc( 1, OPERATION_BUFFER_SIZE ); op->o_hdr = (Opheader *)(op + 1); - op->o_hdr->oh_extensions = NULL; op->o_controls = (void **)(op->o_hdr + 1); op->o_callback = (slap_callback *) slapi_ch_calloc( 1, sizeof(slap_callback) ); @@ -277,6 +276,10 @@ slapi_int_connection_init_pb( Slapi_PBlock *pb, ber_tag_t tag ) op->o_connid = conn->c_connid; op->o_bd = frontendDB; + /* extensions */ + slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op ); + slapi_int_create_object_extensions( SLAPI_X_EXT_CONNECTION, conn ); + pb->pb_op = op; pb->pb_conn = conn; pb->pb_intop = 1; @@ -363,6 +366,9 @@ slapi_int_connection_done_pb( Slapi_PBlock *pb ) ber_sockbuf_free( conn->c_sb ); } + slapi_int_free_object_extensions( SLAPI_X_EXT_OPERATION, op ); + slapi_int_free_object_extensions( SLAPI_X_EXT_CONNECTION, conn ); + slapi_ch_free( (void **)&pb->pb_op->o_callback ); slapi_ch_free( (void **)&pb->pb_op ); slapi_ch_free( (void **)&pb->pb_conn );