server: Add --http-listen-address and --dccp-listen-address.
[paraslash.git] / dccp_send.c
index 69ba65f..52ec6b7 100644 (file)
@@ -42,8 +42,11 @@ struct dccp_fec_client {
 static void dccp_pre_select(int *max_fileno, fd_set *rfds,
                __a_unused fd_set *wfds)
 {
-       if (dss->listen_fd >= 0)
-               para_fd_set(dss->listen_fd, rfds, max_fileno);
+       unsigned n;
+
+       FOR_EACH_LISTEN_FD(n, dss)
+               if (dss->listen_fds[n] >= 0)
+                       para_fd_set(dss->listen_fds[n], rfds, max_fileno);
 }
 
 /**
@@ -240,6 +243,7 @@ void dccp_send_init(struct sender *s)
        s->client_cmds[SENDER_delete] = NULL;
 
        init_sender_status(dss, OPT_RESULT(DCCP_ACCESS),
+               OPT_RESULT(DCCP_LISTEN_ADDRESS),
                OPT_UINT32_VAL(DCCP_PORT), OPT_UINT32_VAL(DCCP_MAX_CLIENTS),
                OPT_GIVEN(DCCP_DEFAULT_DENY));
        generic_com_on(dss, IPPROTO_DCCP);