From 47fc5bc792648cff3bf37679764ee1d296f6c386 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 19 Jan 2008 14:45:14 +0100 Subject: [PATCH] dccp_send.c: Check the return value of mark_fd_nonblocking() also for the client fd. --- dccp_send.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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: -- 2.39.5