ROUND_UP: Add missing parentheses().
[paraslash.git] / dccp_send.c
index 5d8e6593fe0bffd5b628fe92eeffac8d9638c90a..f3b9120b3dfd75ef913a1d4b1f6a2b968e887ba1 100644 (file)
@@ -72,6 +72,15 @@ static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds)
                PARA_ERROR_LOG("%s\n", PARA_STRERROR(-ret));
                return;
        }
+       /*
+        * Bypass unused CCID paths: the sender does not receive application data
+        * from the client; by shutting down this unused communication path we can
+        * reduce processing costs a bit. See analogous comment in dccp_recv.c.
+        */
+       if (shutdown(ret, SHUT_RD) < 0) {
+               PARA_ERROR_LOG("shutdown(SHUT_RD): %s\n", strerror(errno));
+               return;
+       }
        dc = para_calloc(sizeof(struct dccp_client));
        dc->fd = ret;
        dc->name = make_message("%s", remote_name(dc->fd));