Lines Matching refs:reconn
455 struct vhost_user_reconnect *reconn, *next; in vhost_user_client_reconnect() local
464 for (reconn = TAILQ_FIRST(&reconn_list.head); in vhost_user_client_reconnect()
465 reconn != NULL; reconn = next) { in vhost_user_client_reconnect()
466 next = TAILQ_NEXT(reconn, next); in vhost_user_client_reconnect()
468 ret = vhost_user_connect_nonblock(reconn->vsocket->path, reconn->fd, in vhost_user_client_reconnect()
469 (struct sockaddr *)&reconn->un, in vhost_user_client_reconnect()
470 sizeof(reconn->un)); in vhost_user_client_reconnect()
472 close(reconn->fd); in vhost_user_client_reconnect()
474 reconn->vsocket->path, reconn->fd); in vhost_user_client_reconnect()
480 VHOST_LOG_CONFIG(INFO, "(%s) connected\n", reconn->vsocket->path); in vhost_user_client_reconnect()
481 vhost_user_add_connection(reconn->fd, reconn->vsocket); in vhost_user_client_reconnect()
483 TAILQ_REMOVE(&reconn_list.head, reconn, next); in vhost_user_client_reconnect()
484 free(reconn); in vhost_user_client_reconnect()
523 struct vhost_user_reconnect *reconn; in vhost_user_start_client() local
540 reconn = malloc(sizeof(*reconn)); in vhost_user_start_client()
541 if (reconn == NULL) { in vhost_user_start_client()
546 reconn->un = vsocket->un; in vhost_user_start_client()
547 reconn->fd = fd; in vhost_user_start_client()
548 reconn->vsocket = vsocket; in vhost_user_start_client()
550 TAILQ_INSERT_TAIL(&reconn_list.head, reconn, next); in vhost_user_start_client()
969 struct vhost_user_reconnect *reconn, *next; in vhost_user_remove_reconnect() local
973 for (reconn = TAILQ_FIRST(&reconn_list.head); in vhost_user_remove_reconnect()
974 reconn != NULL; reconn = next) { in vhost_user_remove_reconnect()
975 next = TAILQ_NEXT(reconn, next); in vhost_user_remove_reconnect()
977 if (reconn->vsocket == vsocket) { in vhost_user_remove_reconnect()
978 TAILQ_REMOVE(&reconn_list.head, reconn, next); in vhost_user_remove_reconnect()
979 close(reconn->fd); in vhost_user_remove_reconnect()
980 free(reconn); in vhost_user_remove_reconnect()