Lines Matching defs:batch

3755 	ns_ldap_list_batch_t *batch,
3921 if (batch != NULL) {
3922 cookie->batch = batch;
3935 * batch.
3940 cookie->next_cookie_in_batch = batch->cookie_list;
3941 batch->cookie_list = cookie;
3942 batch->nactive++;
4293 * Create and initialize batch for native LDAP lookups
4296 __ns_ldap_list_batch_start(ns_ldap_list_batch_t **batch)
4298 *batch = calloc(1, sizeof (ns_ldap_list_batch_t));
4299 if (*batch == NULL)
4306 * Add a LDAP search request to the batch.
4310 ns_ldap_list_batch_t *batch,
4336 * Strip the NS_LDAP_PAGE_CTRL option as the batch interface does not
4341 rc = ldap_list(batch, service, filter, NULL, init_filter_cb, attribute,
4348 * conn_user. The batch API instructs the search_state_machine
4361 * Free batch.
4364 __ns_ldap_list_batch_release(ns_ldap_list_batch_t *batch)
4368 for (c = batch->cookie_list; c != NULL; c = next) {
4378 free(batch);
4385 * Process batch. Everytime this function is called it selects an
4386 * active cookie from the batch and single steps through the
4389 * removed from the batch and its memory freed.
4391 * Returns 1 (if batch still has active cookies)
4392 * 0 (if batch has no more active cookies)
4396 * to process all the requests added to the batch. The results (and errors)
4402 __ns_ldap_list_batch_process(ns_ldap_list_batch_t *batch, int *rcp)
4410 if (batch->nactive == 0)
4413 /* Get the next cookie from the batch */
4414 c = (batch->next_cookie == NULL) ?
4415 batch->cookie_list : batch->next_cookie;
4417 batch->next_cookie = c->next_cookie_in_batch;
4429 * Note that each cookie in the batch will make this
4481 /* Remove the cookie from the batch */
4482 ptr = batch->cookie_list;
4483 prev = &batch->cookie_list;
4500 batch->nactive--;
4510 * in the batch without getting tied up on just one
4528 return ((batch->nactive > 0) ? 1 : 0);
4533 * Process all the active cookies in the batch and when none
4534 * remains finalize the batch.
4537 __ns_ldap_list_batch_end(ns_ldap_list_batch_t *batch)
4540 while (__ns_ldap_list_batch_process(batch, &rc) > 0)
4542 __ns_ldap_list_batch_release(batch);