Lines Matching refs:cn
1386 ns_conn_mt_t *cn; in __s_api_conn_mt_get() local
1426 for (cn = cmg->cm_head; cn; cn = cn->next) { in __s_api_conn_mt_get()
1427 (void) mutex_lock(&cn->lock); in __s_api_conn_mt_get()
1428 rc = match_conn_mt(cu, &cn, st, server, cred); in __s_api_conn_mt_get()
1429 if (rc == B_FALSE && cn != NULL) /* not found */ in __s_api_conn_mt_get()
1431 if (cn == NULL) { /* not found and cn freed */ in __s_api_conn_mt_get()
1444 if (cn->state == NS_CONN_MT_CONNECTED) { in __s_api_conn_mt_get()
1445 *session = cn->conn; in __s_api_conn_mt_get()
1446 add_cu2cm(cu, cn); in __s_api_conn_mt_get()
1447 cu->conn_mt = cn; in __s_api_conn_mt_get()
1449 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1458 if (cn->state != NS_CONN_MT_CONNECTING || in __s_api_conn_mt_get()
1459 cn->cu_max == 1) { in __s_api_conn_mt_get()
1460 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1465 if (wait_for_conn_mt(cu, cn) != 1) { in __s_api_conn_mt_get()
1476 if (cn->ns_rc != NS_LDAP_NOTFOUND) in __s_api_conn_mt_get()
1482 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1486 return (cn->ns_rc); in __s_api_conn_mt_get()
1490 *session = cn->conn; in __s_api_conn_mt_get()
1492 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1505 cn = init_conn_mt(cmg, errorp); in __s_api_conn_mt_get()
1506 if (cn == NULL) { in __s_api_conn_mt_get()
1510 cu->conn_mt = cn; in __s_api_conn_mt_get()
1511 cn->opened_for = cu->type; in __s_api_conn_mt_get()
1512 cn->referral = cu->referral; in __s_api_conn_mt_get()
1514 cn->cu_max = NS_CONN_MT_USER_MAX; in __s_api_conn_mt_get()
1516 cn->cu_max = 1; in __s_api_conn_mt_get()
1517 add_cm2cmg(cn, cmg); in __s_api_conn_mt_get()