Lines Matching refs:op

59 	Operation *op, *op2;
60 for ( op = data; op; op = op2 ) {
61 op2 = LDAP_STAILQ_NEXT( op, o_next );
62 ber_memfree_x( op, NULL );
67 slap_op_groups_free( Operation *op )
70 for ( g = op->o_groups; g; g = n ) {
72 slap_sl_free( g, op->o_tmpmemctx );
74 op->o_groups = NULL;
78 slap_op_free( Operation *op, void *ctx )
82 assert( LDAP_STAILQ_NEXT(op, o_next) == NULL );
84 if ( op->o_ber != NULL ) {
85 ber_free( op->o_ber, 1 );
87 if ( !BER_BVISNULL( &op->o_dn ) ) {
88 ch_free( op->o_dn.bv_val );
90 if ( !BER_BVISNULL( &op->o_ndn ) ) {
91 ch_free( op->o_ndn.bv_val );
93 if ( !BER_BVISNULL( &op->o_authmech ) ) {
94 ch_free( op->o_authmech.bv_val );
96 if ( op->o_ctrls != NULL ) {
97 slap_free_ctrls( op, op->o_ctrls );
101 if ( op->o_res_ber != NULL ) {
102 ber_free( op->o_res_ber, 1 );
106 if ( op->o_groups ) {
107 slap_op_groups_free( op );
112 slapi_int_free_object_extensions( SLAPI_X_EXT_OPERATION, op );
116 if ( !BER_BVISNULL( &op->o_csn ) ) {
117 op->o_tmpfree( op->o_csn.bv_val, op->o_tmpmemctx );
118 BER_BVZERO( &op->o_csn );
121 opbuf = (OperationBuffer *) op;
123 op->o_hdr = &opbuf->ob_hdr;
124 op->o_controls = opbuf->ob_controls;
129 op, slap_op_q_destroy, &op2, NULL );
130 LDAP_STAILQ_NEXT( op, o_next ) = op2;
132 ber_memfree_x( op, NULL );
159 Operation *op = NULL;
165 op = otmp;
166 otmp = LDAP_STAILQ_NEXT( op, o_next );
171 if (!op) {
172 op = (Operation *) ch_calloc( 1, sizeof(OperationBuffer) );
173 op->o_hdr = &((OperationBuffer *) op)->ob_hdr;
174 op->o_controls = ((OperationBuffer *) op)->ob_controls;
177 op->o_ber = ber;
178 op->o_msgid = msgid;
179 op->o_tag = tag;
181 slap_op_time( &op->o_time, &op->o_tincr );
182 op->o_opid = id;
183 op->o_res_ber = NULL;
187 slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
191 return( op );