X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp_send.c;h=f3b9120b3dfd75ef913a1d4b1f6a2b968e887ba1;hp=0310584ddad17737efcc110db94a8623fbc1635e;hb=78200714a07173565ecff4adc8d12b87895017f3;hpb=7a8d90c41b758d1c3ae8530a44ccd9aaa857581e diff --git a/dccp_send.c b/dccp_send.c index 0310584d..f3b9120b 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -24,7 +24,6 @@ #include "list.h" #include "vss.h" #include "send.h" -#include "dccp.h" #include "fd.h" #include "close_on_fork.h" #include "chunk_queue.h" @@ -73,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));