From: Andre Noll Date: Sat, 19 Jan 2008 13:45:14 +0000 (+0100) Subject: dccp_send.c: Check the return value of mark_fd_nonblocking() also for the client fd. X-Git-Tag: v0.3.1~76 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=47fc5bc792648cff3bf37679764ee1d296f6c386 dccp_send.c: Check the return value of mark_fd_nonblocking() also for the client fd. --- diff --git a/dccp_send.c b/dccp_send.c index 02e60f44..c9a03b94 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -82,13 +82,17 @@ static void dccp_post_select(fd_set *rfds, __a_unused fd_set *wfds) PARA_ERROR_LOG("shutdown(SHUT_RD): %s\n", strerror(errno)); goto err; } + ret = mark_fd_nonblocking(fd); + if (ret < 0) { + PARA_ERROR_LOG("%s\n", para_strerror(-ret)); + goto err; + } dc = para_calloc(sizeof(struct dccp_client)); - dc->fd = ret; + dc->fd = fd; dc->name = make_message("%s", remote_name(dc->fd)); PARA_NOTICE_LOG("connection from %s\n", dc->name); para_list_add(&dc->node, &clients); add_close_on_fork_list(dc->fd); - mark_fd_nonblocking(dc->fd); dc->cq = cq_new(DCCP_MAX_PENDING_BYTES); return; err: