Lines Matching refs:op
57 Operation *op, *op2;
58 for ( op = data; op; op = op2 ) {
59 op2 = LDAP_STAILQ_NEXT( op, o_next );
60 ber_memfree_x( op, NULL );
65 slap_op_groups_free( Operation *op )
68 for ( g = op->o_groups; g; g = n ) {
70 slap_sl_free( g, op->o_tmpmemctx );
72 op->o_groups = NULL;
76 slap_op_free( Operation *op, void *ctx )
80 assert( LDAP_STAILQ_NEXT(op, o_next) == NULL );
83 op->o_abandon = 1;
85 if ( op->o_ber != NULL ) {
86 ber_free( op->o_ber, 1 );
88 if ( !BER_BVISNULL( &op->o_dn ) ) {
89 ch_free( op->o_dn.bv_val );
91 if ( !BER_BVISNULL( &op->o_ndn ) ) {
92 ch_free( op->o_ndn.bv_val );
94 if ( !BER_BVISNULL( &op->o_authmech ) ) {
95 ch_free( op->o_authmech.bv_val );
97 if ( op->o_ctrls != NULL ) {
98 slap_free_ctrls( op, op->o_ctrls );
102 if ( op->o_res_ber != NULL ) {
103 ber_free( op->o_res_ber, 1 );
107 if ( op->o_groups ) {
108 slap_op_groups_free( op );
113 slapi_int_free_object_extensions( SLAPI_X_EXT_OPERATION, op );
117 if ( !BER_BVISNULL( &op->o_csn ) ) {
118 op->o_tmpfree( op->o_csn.bv_val, op->o_tmpmemctx );
121 if ( op->o_pagedresults_state != NULL ) {
122 op->o_tmpfree( op->o_pagedresults_state, op->o_tmpmemctx );
128 opbuf = (OperationBuffer *) op;
129 op->o_bd = NULL;
130 BER_BVZERO( &op->o_req_dn );
131 BER_BVZERO( &op->o_req_ndn );
132 memset( &op->o_request, 0, sizeof( op->o_request ));
133 memset( &op->o_do_not_cache, 0, sizeof( Operation ) - offsetof( Operation, o_do_not_cache ));
135 op->o_controls = opbuf->ob_controls;
140 op, slap_op_q_destroy, (void **)&op2, NULL );
141 LDAP_STAILQ_NEXT( op, o_next ) = op2;
143 op->o_tincr = op2->o_tincr + 1;
145 if ( op->o_tincr > 10 ) {
148 ber_memfree_x( op, NULL );
151 op->o_tincr = 1;
154 ber_memfree_x( op, NULL );
181 Operation *op = NULL;
187 op = otmp;
188 otmp = LDAP_STAILQ_NEXT( op, o_next );
191 op->o_abandon = 0;
192 op->o_cancel = 0;
195 if (!op) {
196 op = (Operation *) ch_calloc( 1, sizeof(OperationBuffer) );
197 op->o_hdr = &((OperationBuffer *) op)->ob_hdr;
198 op->o_controls = ((OperationBuffer *) op)->ob_controls;
201 op->o_ber = ber;
202 op->o_msgid = msgid;
203 op->o_tag = tag;
205 slap_op_time( &op->o_time, &op->o_tincr );
206 op->o_opid = id;
210 slapi_int_create_object_extensions( SLAPI_X_EXT_OPERATION, op );
214 return( op );