From b6de172b3545a73f6f31500ee9c4d51898fbe2bc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 9 Dec 2020 18:30:22 +0000 Subject: Get rid of webipc.h --- src/conn-tools/s6-tcpserver4-socketbinder.c | 8 ++++---- src/conn-tools/s6-tcpserver6-socketbinder.c | 8 ++++---- src/tls/s6-ucspitlsc.c | 2 +- src/tls/s6-ucspitlsd.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/conn-tools/s6-tcpserver4-socketbinder.c b/src/conn-tools/s6-tcpserver4-socketbinder.c index a37fae1..c02c3a6 100644 --- a/src/conn-tools/s6-tcpserver4-socketbinder.c +++ b/src/conn-tools/s6-tcpserver4-socketbinder.c @@ -3,13 +3,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -21,7 +21,7 @@ int main (int argc, char const *const *argv) unsigned int backlog = SOMAXCONN ; int flagreuse = 1 ; int flagudp = 0 ; - int flagblocking = 0 ; + unsigned int flags = O_NONBLOCK ; char ip[4] ; uint16_t port ; PROG = "s6-tcpserver4-socketbinder" ; @@ -37,7 +37,7 @@ int main (int argc, char const *const *argv) case 'd' : flagreuse = 1 ; break ; case 'M' : flagudp = 0 ; break ; case 'm' : flagudp = 1 ; break ; - case 'B' : flagblocking = 1 ; break ; + case 'B' : flags = 0 ; break ; case 'b' : if (!uint0_scan(l.arg, &backlog)) dieusage() ; break ; default : dieusage() ; } @@ -47,7 +47,7 @@ int main (int argc, char const *const *argv) if (argc < 3) dieusage() ; if (!ip4_scan(argv[0], ip) || !uint160_scan(argv[1], &port)) dieusage() ; close(0) ; - if (flagudp ? socket_udp4_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB) : socket_tcp4_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB)) + if (flagudp ? socket_udp4_internal(flags) : socket_tcp4_internal(flags)) strerr_diefu1sys(111, "create socket") ; if ((flagreuse ? socket_bind4_reuse(0, ip, port) : socket_bind4(0, ip, port)) < 0) strerr_diefu5sys(111, "bind to ", argv[0], ":", argv[1], " ") ; diff --git a/src/conn-tools/s6-tcpserver6-socketbinder.c b/src/conn-tools/s6-tcpserver6-socketbinder.c index 683dc7c..6890d7e 100644 --- a/src/conn-tools/s6-tcpserver6-socketbinder.c +++ b/src/conn-tools/s6-tcpserver6-socketbinder.c @@ -3,13 +3,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include @@ -21,7 +21,7 @@ int main (int argc, char const *const *argv) unsigned int backlog = SOMAXCONN ; int flagreuse = 1 ; int flagudp = 0 ; - int flagblocking = 0 ; + unsigned int flags = O_NONBLOCK ; char ip[16] ; uint16_t port ; PROG = "s6-tcpserver6-socketbinder" ; @@ -37,7 +37,7 @@ int main (int argc, char const *const *argv) case 'd' : flagreuse = 1 ; break ; case 'M' : flagudp = 0 ; break ; case 'm' : flagudp = 1 ; break ; - case 'B' : flagblocking = 1 ; break ; + case 'B' : flags = 0 ; break ; case 'b' : if (!uint0_scan(l.arg, &backlog)) dieusage() ; break ; default : dieusage() ; } @@ -47,7 +47,7 @@ int main (int argc, char const *const *argv) if (argc < 3) dieusage() ; if (!ip6_scan(argv[0], ip) || !uint160_scan(argv[1], &port)) dieusage() ; close(0) ; - if (flagudp ? socket_udp6_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB) : socket_tcp6_internal(flagblocking ? 0 : DJBUNIX_FLAG_NB)) + if (flagudp ? socket_udp6_internal(flags) : socket_tcp6_internal(flags)) strerr_diefu1sys(111, "create socket") ; if ((flagreuse ? socket_bind6_reuse(0, ip, port) : socket_bind6(0, ip, port)) < 0) strerr_diefu5sys(111, "bind to ", argv[0], ":", argv[1], " ") ; diff --git a/src/tls/s6-ucspitlsc.c b/src/tls/s6-ucspitlsc.c index 92660eb..c8e2e68 100644 --- a/src/tls/s6-ucspitlsc.c +++ b/src/tls/s6-ucspitlsc.c @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include "s6tls-internal.h" diff --git a/src/tls/s6-ucspitlsd.c b/src/tls/s6-ucspitlsd.c index 4bfa253..dbabf4e 100644 --- a/src/tls/s6-ucspitlsd.c +++ b/src/tls/s6-ucspitlsd.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include "s6tls-internal.h" -- cgit v1.2.3