From cfff837d831b6f4e12dcc87c1d59789fe08597a6 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 17 Mar 2010 12:52:54 +0100 Subject: Fixes for client communication - catch all errors of send() and recv(), not only EAGAIN - check if send() or recv() return EWOULDBLOCK or EINTR - remove unused parameter from client_send() and client_recv() - fix a debugging message --- src/responder/common/responder_common.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/responder/common/responder_common.c') diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c index 156f0c84..315eb735 100644 --- a/src/responder/common/responder_common.c +++ b/src/responder/common/responder_common.c @@ -65,7 +65,7 @@ static int client_destructor(struct cli_ctx *ctx) return 0; } -static void client_send(struct tevent_context *ev, struct cli_ctx *cctx) +static void client_send(struct cli_ctx *cctx) { int ret; @@ -75,7 +75,7 @@ static void client_send(struct tevent_context *ev, struct cli_ctx *cctx) return; } if (ret != EOK) { - DEBUG(0, ("Failed to read request, aborting client!\n")); + DEBUG(0, ("Failed to send data, aborting client!\n")); talloc_free(cctx); return; } @@ -88,7 +88,7 @@ static void client_send(struct tevent_context *ev, struct cli_ctx *cctx) return; } -static void client_recv(struct tevent_context *ev, struct cli_ctx *cctx) +static void client_recv(struct cli_ctx *cctx) { int ret; @@ -277,11 +277,11 @@ static void client_fd_handler(struct tevent_context *ev, } if (flags & TEVENT_FD_READ) { - client_recv(ev, cctx); + client_recv(cctx); return; } if (flags & TEVENT_FD_WRITE) { - client_send(ev, cctx); + client_send(cctx); return; } } -- cgit