X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=dccp_send.c;h=47d6b4089d8f7f229c27d3af262068f2d37ee2c3;hb=e854df2fe2cfb3ae90a439828fc13cc0fc470aa9;hp=55f189ad4eb01632dbcd653e104ef7f0cfe54ff8;hpb=b3c68fd8519a426d6b6285dcb5a865670285e99a;p=paraslash.git diff --git a/dccp_send.c b/dccp_send.c index 55f189ad..47d6b408 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -24,8 +24,8 @@ #include "net.h" #include "server.h" #include "list.h" -#include "send.h" #include "sched.h" +#include "send.h" #include "vss.h" #include "fd.h" @@ -36,14 +36,13 @@ struct dccp_fec_client { struct fec_client *fc; }; -static void dccp_pre_select(int *max_fileno, fd_set *rfds, - __a_unused fd_set *wfds) +static void dccp_pre_select(struct sched *s) { unsigned n; FOR_EACH_LISTEN_FD(n, dss) if (dss->listen_fds[n] >= 0) - para_fd_set(dss->listen_fds[n], rfds, max_fileno); + para_fd_set(dss->listen_fds[n], &s->rfds, &s->max_fileno); } /** @@ -119,14 +118,14 @@ static void dccp_send_fec(struct sender_client *sc, char *buf, size_t len) dccp_shutdown_client(sc); } -static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds) +static void dccp_post_select(__a_unused struct sched *s) { struct sender_client *sc; struct dccp_fec_client *dfc; int tx_ccid; uint32_t k, n; - sc = accept_sender_client(dss, rfds); + sc = accept_sender_client(dss); if (!sc) return; @@ -232,6 +231,8 @@ static void dccp_send_init(void) OPT_RESULT(DCCP_LISTEN_ADDRESS), OPT_UINT32_VAL(DCCP_PORT), OPT_UINT32_VAL(DCCP_MAX_CLIENTS), OPT_GIVEN(DCCP_DEFAULT_DENY)); + if (OPT_GIVEN(DCCP_NO_AUTOSTART)) + return; generic_com_on(dss, IPPROTO_DCCP); }