child: add addr argument to child_listening_sock().

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 070d621534)
This commit is contained in:
Michael Adam 2013-11-07 14:30:35 +01:00
parent a8a2342527
commit 425ce3beb6
3 changed files with 4 additions and 4 deletions

View File

@ -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; return listenfd;
} }

View File

@ -30,7 +30,7 @@ typedef enum {
} child_config_t; } child_config_t;
extern short int child_pool_create (void); 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_close_sock (void);
extern void child_main_loop (void); extern void child_main_loop (void);
extern void child_kill_children (int sig); extern void child_kill_children (int sig);

View File

@ -411,7 +411,7 @@ main (int argc, char **argv)
#endif /* FILTER_ENABLE */ #endif /* FILTER_ENABLE */
/* Start listening on the selected port. */ /* 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", fprintf (stderr, "%s: Could not create listening socket.\n",
argv[0]); argv[0]);
exit (EX_OSERR); exit (EX_OSERR);