Lines Matching defs:rc

62 static void close_conn_mt_by_procchg(ns_conn_mt_t *cm, int rc, char *errmsg);
158 int rc;
161 rc = thr_getspecific(ns_mtckey, &tsd);
162 if (rc == 0 && tsd != NULL)
203 int rc;
205 rc = thr_setspecific(ns_cmgkey, cmg);
206 if (rc != 0) /* must be ENOMEM */
210 rc = thr_getspecific(ns_mtckey, &tsd);
211 if (rc == 0 && tsd != NULL)
218 rc = thr_setspecific(ns_mtckey, tsd);
219 if (rc != 0) { /* must be ENOMEM */
322 int rc;
342 rc = ldap_set_option(ld, LDAP_OPT_THREAD_FN_PTRS,
344 if (rc < 0) {
363 rc = ldap_set_option(ld, LDAP_OPT_EXTRA_THREAD_FN_PTRS,
365 if (rc < 0) {
723 int rc;
752 rc = __ns_ldap_trydoorcall(&sptr, &ndata,
754 if (rc != NS_CACHE_SUCCESS)
760 " (rc = %d)"), rc);
1153 int rc;
1172 rc = __s_api_requestServer(NS_CACHE_NEW, NULL,
1174 if (rc != NS_LDAP_SUCCESS || sinfo.server == NULL) {
1224 * For 2 and 4, close the connection with error rc, LDAP_SERVER_DOWN.
1264 * cm->lock is unlocked at exit if rc is B_FALSE.
1300 * conn_user to consume the rc
1384 int rc;
1428 rc = match_conn_mt(cu, &cn, st, server, cred);
1429 if (rc == B_FALSE && cn != NULL) /* not found */
1632 /* save error info (rc and ns_ldap_error_t) in the conn_mt */
1634 err2cm(ns_conn_mt_t *cm, int rc, ns_ldap_error_t **errorp) {
1637 cm->ns_rc = rc;
1648 /* copy error info (rc and ns_ldap_error_t) from conn_mt to conn_user */
1666 /* copy error info (rc and ns_ldap_error_t) from caller to conn_user */
1668 err_from_caller(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp) {
1670 cu->ns_rc = rc;
1685 * rc : error code
1691 __s_api_conn_mt_remove(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp)
1707 cm->ns_rc = rc;
1714 /* all the conn_users share the same error rc and ns_ldap_error_t */
1738 int rc;
1746 rc = setup_mt_ld(ld, cmg);
1752 * this function will return with rc NS_LDAP_OP_FAILED.
1756 if (rc < 0)
1770 if (rc < 0)
1781 close_conn_mt(ns_conn_mt_t *cm, int rc, ns_ldap_error_t **errorp,
1813 err2cm(cm, rc, errorp);
1846 * rc : error code
1852 __s_api_conn_mt_close(ns_conn_user_t *cu, int rc, ns_ldap_error_t **errorp)
1869 free_cm = close_conn_mt(cm, rc, errorp, cu);
1876 if (rc != NS_LDAP_SUCCESS) { /* error info passed in, use it */
1877 err_from_caller(cu, rc, errorp);
1898 close_conn_mt_by_procchg(ns_conn_mt_t *cm, int rc, char *errmsg)
1910 ep->status = rc;
2281 ns_conn_user_type_t type, int *try_cnt, int *rc,
2293 if (cu->type == NS_CONN_USER_GETENT && *rc == NS_LDAP_SUCCESS)
2304 if (*rc == NS_LDAP_SUCCESS || retry != B_TRUE)
2315 *rc = NS_LDAP_MEMORY;
2318 /* for 1+ try, use previous rc and errorp */
2323 if (*try_cnt > 1 && rc != NS_LDAP_SUCCESS && *errorp != NULL)
2334 int rc;
2351 rc = conn_tsd_check(cmg);
2352 if (rc != NS_LDAP_SUCCESS) {
2354 return (rc);