diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-09-08 02:47:03 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-09-08 02:47:03 +0200 |
commit | a171050b71dbe8c1950f8e9f4d2ba6c36aa64196 (patch) | |
tree | 01fea67cfd89530651c1c6e58a301bc53a64dd8c | |
parent | 75e55d46fbf193ba4768b8fdd9926783968e7be8 (diff) |
WIP debugbind-to-device-21.02
-rw-r--r-- | listen.c | 5 | ||||
-rw-r--r-- | main.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -174,6 +174,10 @@ int uh_socket_bind(const char *host, const char *port, const char *device, bool goto error; } + if (device) { + fprintf(stderr, "uhttpd: bound device %s\n", device); + } + /* bind */ if (bind(sock, p->ai_addr, p->ai_addrlen) < 0) { perror("bind()"); @@ -196,6 +200,7 @@ int uh_socket_bind(const char *host, const char *port, const char *device, bool l->tls = tls; l->addr = *(struct sockaddr_in6 *)p->ai_addr; list_add_tail(&l->list, &listeners); + fprintf(stderr, "uhttpd: socket bound\n"); bound++; continue; @@ -291,6 +291,7 @@ int main(int argc, char **argv) else { free(device); device = strdup(optarg); + fprintf(stderr, "uhttpd: bind device %s\n", device); } break; @@ -309,6 +310,7 @@ int main(int argc, char **argv) #endif case 'p': optarg = strdup(optarg); + fprintf(stderr, "uhttpd: listen device %s\n", device); bound += add_listener_arg(optarg, device, (ch == 's')); break; |