Lines Matching defs:rc

59 static void close_conn_mt_by_procchg(ns_conn_mt_t *cm, int rc, char *errmsg);
155 int rc;
158 rc = thr_getspecific(ns_mtckey, &tsd);
159 if (rc == 0 && tsd != NULL)
200 int rc;
202 rc = thr_setspecific(ns_cmgkey, cmg);
203 if (rc != 0) /* must be ENOMEM */
207 rc = thr_getspecific(ns_mtckey, &tsd);
208 if (rc == 0 && tsd != NULL)
215 rc = thr_setspecific(ns_mtckey, tsd);
216 if (rc != 0) { /* must be ENOMEM */
319 int rc;
339 rc = ldap_set_option(ld, LDAP_OPT_THREAD_FN_PTRS,
341 if (rc < 0) {
360 rc = ldap_set_option(ld, LDAP_OPT_EXTRA_THREAD_FN_PTRS,
362 if (rc < 0) {
724 int rc;
753 rc = __ns_ldap_trydoorcall(&sptr, &ndata,
755 if (rc != NS_CACHE_SUCCESS)
761 " (rc = %d)"), rc);
1215 int rc;
1234 rc = __s_api_requestServer(NS_CACHE_NEW, NULL,
1236 if (rc != NS_LDAP_SUCCESS || sinfo.server == NULL) {
1286 * For 2 and 4, close the connection with error rc, LDAP_SERVER_DOWN.
1326 * cm->lock is unlocked at exit if rc is B_FALSE.
1362 * conn_user to consume the rc
1446 int rc;
1490 rc = match_conn_mt(cu, &cn, st, server, cred);
1491 if (rc == B_FALSE && cn != NULL) /* not found */
1694 /* save error info (rc and ns_ldap_error_t) in the conn_mt */
1696 err2cm(ns_conn_mt_t *cm, int rc, ns_ldap_error_t **errorp) {
1699 cm->ns_rc = rc;
1710 /* copy error info (rc and ns_ldap_error_t) from conn_mt to conn_user */
1728 /* copy error info (rc and ns_ldap_error_t) from caller to conn_user */
1730 err_from_caller(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp) {
1732 cu->ns_rc = rc;
1747 * rc : error code
1753 __s_api_conn_mt_remove(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp)
1769 cm->ns_rc = rc;
1778 /* all the conn_users share the same error rc and ns_ldap_error_t */
1802 int rc;
1810 rc = setup_mt_ld(ld, cmg);
1816 * this function will return with rc NS_LDAP_OP_FAILED.
1820 if (rc < 0)
1834 if (rc < 0)
1845 close_conn_mt(ns_conn_mt_t *cm, int rc, ns_ldap_error_t **errorp,
1867 * if rc is not LDAP_SERVER_DOWN. We assume
1872 if (cu != NULL && rc != LDAP_SERVER_DOWN)
1887 err2cm(cm, rc, errorp);
1920 * rc : error code
1926 __s_api_conn_mt_close(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp)
1943 free_cm = close_conn_mt(cm, rc, errorp, cu);
1950 if (rc != NS_LDAP_SUCCESS) { /* error info passed in, use it */
1951 err_from_caller(cu, rc, errorp);
1972 close_conn_mt_by_procchg(ns_conn_mt_t *cm, int rc, char *errmsg)
1984 ep->status = rc;
2355 ns_conn_user_type_t type, int *try_cnt, int *rc,
2367 if (cu->type == NS_CONN_USER_GETENT && *rc == NS_LDAP_SUCCESS)
2378 if (*rc == NS_LDAP_SUCCESS || retry != B_TRUE)
2389 *rc = NS_LDAP_MEMORY;
2392 /* for 1+ try, use previous rc and errorp */
2397 if (*try_cnt > 1 && rc != NS_LDAP_SUCCESS && *errorp != NULL)
2408 int rc;
2425 rc = conn_tsd_check(cmg);
2426 if (rc != NS_LDAP_SUCCESS) {
2428 return (rc);