Lines Matching refs:reconn
454 struct vhost_user_reconnect *reconn, *next; in vhost_user_client_reconnect() local
463 for (reconn = TAILQ_FIRST(&reconn_list.head); in vhost_user_client_reconnect()
464 reconn != NULL; reconn = next) { in vhost_user_client_reconnect()
465 next = TAILQ_NEXT(reconn, next); in vhost_user_client_reconnect()
467 ret = vhost_user_connect_nonblock(reconn->fd, in vhost_user_client_reconnect()
468 (struct sockaddr *)&reconn->un, in vhost_user_client_reconnect()
469 sizeof(reconn->un)); in vhost_user_client_reconnect()
471 close(reconn->fd); in vhost_user_client_reconnect()
474 reconn->fd); in vhost_user_client_reconnect()
481 "%s: connected\n", reconn->vsocket->path); in vhost_user_client_reconnect()
482 vhost_user_add_connection(reconn->fd, reconn->vsocket); in vhost_user_client_reconnect()
484 TAILQ_REMOVE(&reconn_list.head, reconn, next); in vhost_user_client_reconnect()
485 free(reconn); in vhost_user_client_reconnect()
526 struct vhost_user_reconnect *reconn; in vhost_user_start_client() local
545 reconn = malloc(sizeof(*reconn)); in vhost_user_start_client()
546 if (reconn == NULL) { in vhost_user_start_client()
552 reconn->un = vsocket->un; in vhost_user_start_client()
553 reconn->fd = fd; in vhost_user_start_client()
554 reconn->vsocket = vsocket; in vhost_user_start_client()
556 TAILQ_INSERT_TAIL(&reconn_list.head, reconn, next); in vhost_user_start_client()
985 struct vhost_user_reconnect *reconn, *next; in vhost_user_remove_reconnect() local
989 for (reconn = TAILQ_FIRST(&reconn_list.head); in vhost_user_remove_reconnect()
990 reconn != NULL; reconn = next) { in vhost_user_remove_reconnect()
991 next = TAILQ_NEXT(reconn, next); in vhost_user_remove_reconnect()
993 if (reconn->vsocket == vsocket) { in vhost_user_remove_reconnect()
994 TAILQ_REMOVE(&reconn_list.head, reconn, next); in vhost_user_remove_reconnect()
995 close(reconn->fd); in vhost_user_remove_reconnect()
996 free(reconn); in vhost_user_remove_reconnect()