Lines Matching refs:cn
1395 ns_conn_mt_t *cn; in __s_api_conn_mt_get() local
1435 for (cn = cmg->cm_head; cn; cn = cn->next) { in __s_api_conn_mt_get()
1436 (void) mutex_lock(&cn->lock); in __s_api_conn_mt_get()
1437 rc = match_conn_mt(cu, &cn, st, server, cred); in __s_api_conn_mt_get()
1438 if (rc == B_FALSE && cn != NULL) /* not found */ in __s_api_conn_mt_get()
1440 if (cn == NULL) { /* not found and cn freed */ in __s_api_conn_mt_get()
1453 if (cn->state == NS_CONN_MT_CONNECTED) { in __s_api_conn_mt_get()
1454 *session = cn->conn; in __s_api_conn_mt_get()
1455 add_cu2cm(cu, cn); in __s_api_conn_mt_get()
1456 cu->conn_mt = cn; in __s_api_conn_mt_get()
1458 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1467 if (cn->state != NS_CONN_MT_CONNECTING || in __s_api_conn_mt_get()
1468 cn->cu_max == 1) { in __s_api_conn_mt_get()
1469 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1474 if (wait_for_conn_mt(cu, cn) != 1) { in __s_api_conn_mt_get()
1485 if (cn->ns_rc != NS_LDAP_NOTFOUND) in __s_api_conn_mt_get()
1491 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1495 return (cn->ns_rc); in __s_api_conn_mt_get()
1499 *session = cn->conn; in __s_api_conn_mt_get()
1501 (void) mutex_unlock(&cn->lock); in __s_api_conn_mt_get()
1514 cn = init_conn_mt(cmg, errorp); in __s_api_conn_mt_get()
1515 if (cn == NULL) { in __s_api_conn_mt_get()
1519 cu->conn_mt = cn; in __s_api_conn_mt_get()
1520 cn->opened_for = cu->type; in __s_api_conn_mt_get()
1521 cn->referral = cu->referral; in __s_api_conn_mt_get()
1523 cn->cu_max = NS_CONN_MT_USER_MAX; in __s_api_conn_mt_get()
1525 cn->cu_max = 1; in __s_api_conn_mt_get()
1526 add_cm2cmg(cn, cmg); in __s_api_conn_mt_get()