Lines Matching refs:cxn
252 vs_connection_t *cxn; in vs_eng_config_close() local
255 cxn = &(eng->vse_cxns[i]); in vs_eng_config_close()
257 switch (cxn->vsc_state) { in vs_eng_config_close()
260 cxn->vsc_state = VS_ENG_CLOSE_PENDING; in vs_eng_config_close()
263 (void) close(cxn->vsc_sockfd); in vs_eng_config_close()
264 cxn->vsc_sockfd = -1; in vs_eng_config_close()
265 cxn->vsc_state = VS_ENG_DISCONNECTED; in vs_eng_config_close()
300 vs_connection_t *cxn; in vs_eng_housekeeper() local
315 cxn = &(eng->vse_cxns[j]); in vs_eng_housekeeper()
317 if ((cxn->vsc_state == VS_ENG_AVAILABLE) && in vs_eng_housekeeper()
318 (cxn->vsc_avail_time.tv_sec < expire)) { in vs_eng_housekeeper()
319 (void) close(cxn->vsc_sockfd); in vs_eng_housekeeper()
320 cxn->vsc_sockfd = -1; in vs_eng_housekeeper()
321 cxn->vsc_state = VS_ENG_DISCONNECTED; in vs_eng_housekeeper()
379 vs_connection_t *cxn; in vs_eng_get() local
423 cxn = &(eng->vse_cxns[cidx]); in vs_eng_get()
441 eng_ctx->vse_sockfd = cxn->vsc_sockfd; in vs_eng_get()
443 if (cxn->vsc_state == VS_ENG_INUSE) { in vs_eng_get()
470 switch (cxn->vsc_state) { in vs_eng_get()
477 cxn->vsc_state = VS_ENG_INUSE; in vs_eng_get()
489 cxn->vsc_sockfd = sockfd; in vs_eng_get()
536 vs_connection_t *cxn; in vs_eng_find_connection() local
548 cxn = &(eng->vse_cxns[i]); in vs_eng_find_connection()
549 if (cxn->vsc_state == VS_ENG_AVAILABLE) { in vs_eng_find_connection()
551 cxn->vsc_state = VS_ENG_INUSE; in vs_eng_find_connection()
556 (cxn->vsc_state == VS_ENG_DISCONNECTED)) { in vs_eng_find_connection()
609 vs_connection_t *cxn; in vs_eng_release() local
612 cxn = &(vs_engines[eidx].vse_cxns[cidx]); in vs_eng_release()
614 switch (cxn->vsc_state) { in vs_eng_release()
618 cxn->vsc_state = VS_ENG_DISCONNECTED; in vs_eng_release()
622 cxn->vsc_state = VS_ENG_AVAILABLE; in vs_eng_release()
623 (void) gettimeofday(&cxn->vsc_avail_time, NULL); in vs_eng_release()
628 (void) close(cxn->vsc_sockfd); in vs_eng_release()
629 cxn->vsc_sockfd = -1; in vs_eng_release()
630 cxn->vsc_state = VS_ENG_DISCONNECTED; in vs_eng_release()
661 vs_connection_t *cxn; in vs_eng_close_connections() local
668 cxn = &(vs_engines[i].vse_cxns[j]); in vs_eng_close_connections()
670 switch (cxn->vsc_state) { in vs_eng_close_connections()
674 (void) close(cxn->vsc_sockfd); in vs_eng_close_connections()
675 cxn->vsc_sockfd = -1; in vs_eng_close_connections()
684 cxn->vsc_state = VS_ENG_DISCONNECTED; in vs_eng_close_connections()