search for: next_address

Displaying 4 results from an estimated 4 matches for "next_address".

2019 Sep 12
2
[PATCH libnbd 1/2] nbd_connect_tcp: Try to return errno from underlying connect(2) call.
...;hostname, h->port); return -1; } @@ -182,6 +185,8 @@ disable_nagle (int sock) if (connect (fd, h->rp->ai_addr, h->rp->ai_addrlen) == -1) { if (errno != EINPROGRESS) { + if (h->connect_errno == 0) + h->connect_errno = errno; SET_NEXT_STATE (%NEXT_ADDRESS); return 0; } @@ -203,8 +208,11 @@ disable_nagle (int sock) /* This checks the status of the original connect call. */ if (status == 0) SET_NEXT_STATE (%^MAGIC.START); - else + else { + if (h->connect_errno == 0) + h->connect_errno = status; SET_NEXT_STAT...
2023 Mar 23
1
[libnbd PATCH v3 14/19] CONNECT_COMMAND.START: plug child process leak on error
...connect.c | 48 +++++++++++--------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/generator/states-connect.c b/generator/states-connect.c index 0fe44f6d44d5..4dce7e01f457 100644 --- a/generator/states-connect.c +++ b/generator/states-connect.c @@ -239,103 +239,109 @@ CONNECT_TCP.NEXT_ADDRESS: CONNECT_COMMAND.START: enum state next; + bool parentfd_transferred; int sv[2]; - pid_t pid; int flags; struct socket *sock; + pid_t pid; assert (!h->sock); assert (h->argv.ptr); assert (h->argv.ptr[0]); next = %.DEAD; + parentfd_transferred = false;...
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here: <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. See the Notes section on each patch for the v4 updates. The series is nearly ready for merging: every patch has at least one R-b tag, except "socket activation: avoid manipulating the sign bit". The series builds, and passes "make check" and "make check-valgrind", at
2019 May 23
2
[PATCH libnbd] api: Get rid of nbd_connection.
This isn't quite finished because not all of the tests or examples have been updated, but it demonstrates an idea: Should we forget about the concept of having multiple connections managed under a single handle? In this patch there is a single ‘struct nbd_handle *’ which manages a single state machine and connection (and therefore no nbd_connection). To connect to a multi-conn server you must