From 070d6215340379cbea7cc404ff4bb450a0ddea8b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 7 Nov 2013 14:30:35 +0100 Subject: child: add addr argument to child_listening_sock(). Signed-off-by: Michael Adam --- src/child.c | 4 ++-- src/child.h | 2 +- src/main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/child.c b/src/child.c index 3ed4030..144b032 100644 --- a/src/child.c +++ b/src/child.c @@ -464,9 +464,9 @@ void child_kill_children (int sig) } } -int child_listening_sock (uint16_t port) +int child_listening_sock (const char *addr, uint16_t port) { - listenfd = listen_sock (config.ipAddr, port); + listenfd = listen_sock (addr, port); return listenfd; } diff --git a/src/child.h b/src/child.h index 7fec1dc..774431f 100644 --- a/src/child.h +++ b/src/child.h @@ -30,7 +30,7 @@ typedef enum { } child_config_t; extern short int child_pool_create (void); -extern int child_listening_sock (uint16_t port); +extern int child_listening_sock (const char *addr, uint16_t port); extern void child_close_sock (void); extern void child_main_loop (void); extern void child_kill_children (int sig); diff --git a/src/main.c b/src/main.c index abb047d..99ab664 100644 --- a/src/main.c +++ b/src/main.c @@ -430,7 +430,7 @@ main (int argc, char **argv) #endif /* FILTER_ENABLE */ /* Start listening on the selected port. */ - if (child_listening_sock (config.port) < 0) { + if (child_listening_sock (config.ipAddr, config.port) < 0) { fprintf (stderr, "%s: Could not create listening socket.\n", argv[0]); exit (EX_OSERR); -- cgit v1.2.3