Lines Matching defs:batch
3051 ns_ldap_list_batch_t *batch,
3212 if (batch != NULL) {
3213 cookie->batch = batch;
3226 * batch.
3231 cookie->next_cookie_in_batch = batch->cookie_list;
3232 batch->cookie_list = cookie;
3233 batch->nactive++;
3339 * Create and initialize batch for native LDAP lookups
3342 __ns_ldap_list_batch_start(ns_ldap_list_batch_t **batch)
3344 *batch = calloc(1, sizeof (ns_ldap_list_batch_t));
3345 if (*batch == NULL)
3352 * Add a LDAP search request to the batch.
3356 ns_ldap_list_batch_t *batch,
3382 * Strip the NS_LDAP_PAGE_CTRL option as the batch interface does not
3387 rc = ldap_list(batch, service, filter, NULL, init_filter_cb, attribute,
3393 * conn_user. The batch API instructs the search_state_machine
3406 * Free batch.
3409 __ns_ldap_list_batch_release(ns_ldap_list_batch_t *batch)
3413 for (c = batch->cookie_list; c != NULL; c = next) {
3423 free(batch);
3430 * Process batch. Everytime this function is called it selects an
3431 * active cookie from the batch and single steps through the
3434 * removed from the batch and its memory freed.
3436 * Returns 1 (if batch still has active cookies)
3437 * 0 (if batch has no more active cookies)
3441 * to process all the requests added to the batch. The results (and errors)
3447 __ns_ldap_list_batch_process(ns_ldap_list_batch_t *batch, int *rcp)
3455 if (batch->nactive == 0)
3458 /* Get the next cookie from the batch */
3459 c = (batch->next_cookie == NULL) ?
3460 batch->cookie_list : batch->next_cookie;
3462 batch->next_cookie = c->next_cookie_in_batch;
3474 * Note that each cookie in the batch will make this
3526 /* Remove the cookie from the batch */
3527 ptr = batch->cookie_list;
3528 prev = &batch->cookie_list;
3545 batch->nactive--;
3555 * in the batch without getting tied up on just one
3573 return ((batch->nactive > 0) ? 1 : 0);
3578 * Process all the active cookies in the batch and when none
3579 * remains finalize the batch.
3582 __ns_ldap_list_batch_end(ns_ldap_list_batch_t *batch)
3585 while (__ns_ldap_list_batch_process(batch, &rc) > 0)
3587 __ns_ldap_list_batch_release(batch);