]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - dccp_send.c
Misc documentation cleanups related to select().
[paraslash.git] / dccp_send.c
index 496895a509f15466e7430af454c784a09bc3ce7e..5c274237ce33a106c90b3570b000f01572c5ad44 100644 (file)
@@ -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);
+                       sched_monitor_readfd(dss->listen_fds[n], s);
 }
 
 /**
@@ -87,6 +86,7 @@ static void dccp_shutdown(void)
 {
        dccp_shutdown_clients();
        generic_acl_deplete(&dss->acl);
+       free_sender_status(dss);
 }
 
 /** * Obtain current MPS according to RFC 4340, sec. 14. */
@@ -118,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;
 
@@ -231,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);
 }