1 /* operation.c - routines to deal with pending ldap operations */
14 slap_op_free( Operation *op )
16 assert( op->o_next == NULL );
18 if ( op->o_ber != NULL ) {
19 ber_free( op->o_ber, 1 );
21 if ( op->o_dn != NULL ) {
24 if ( op->o_ndn != NULL ) {
28 ldap_pvt_thread_mutex_destroy( &op->o_abandonmutex );
43 op = (Operation *) ch_calloc( 1, sizeof(Operation) );
45 ldap_pvt_thread_mutex_init( &op->o_abandonmutex );
55 op->o_time = slap_get_time();
69 for ( tmp = olist; *tmp != NULL; tmp = &(*tmp)->o_next )
78 slap_op_remove( Operation **olist, Operation *op )
82 for ( tmp = olist; *tmp != NULL && *tmp != op; tmp = &(*tmp)->o_next )
86 Debug( LDAP_DEBUG_ANY, "op_delete: can't find op %ld\n",
91 *tmp = (*tmp)->o_next;
97 Operation * slap_op_pop( Operation **olist )
99 Operation *tmp = *olist;
102 *olist = tmp->o_next;