MINOR: tools: make str2sa_range() optionally return the fd
If a file descriptor was passed, we can optionally return it. This will
be useful for listening sockets which are both a pre-bound FD and a ready
socket.
diff --git a/src/cli.c b/src/cli.c
index 55d2a03..2892d88 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -2475,7 +2475,8 @@
newsrv->conf.line = 0;
memprintf(&msg, "sockpair@%d", child->ipc_fd[0]);
- if ((sk = str2sa_range(msg, &port, &port1, &port2, &errmsg, NULL, NULL, PA_O_STREAM)) == 0) {
+ if ((sk = str2sa_range(msg, &port, &port1, &port2, NULL,
+ &errmsg, NULL, NULL, PA_O_STREAM)) == 0) {
goto error;
}
free(msg);