From 6b9b169c2746c0223f249700d7ff8a70feb8da62 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 20 Sep 2004 10:40:11 +0000 Subject: r2443: check return code of event_loop_once() to catch thet cases where the server closes the connetion and we got EBADF from select() and event_loop_once() fails metze (This used to be commit 9c0e50a6f3d628156b4543d5ded89e06be696f64) --- source4/librpc/rpc/dcerpc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/librpc') diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index a4f93973f7..99051e75b6 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -436,7 +436,9 @@ static NTSTATUS full_request(struct dcerpc_pipe *p, while (NT_STATUS_IS_OK(state->status) && state->reply_blob) { struct event_context *ctx = p->transport.event_context(p); - event_loop_once(ctx); + if (event_loop_once(ctx) != 0) { + return NT_STATUS_CONNECTION_DISCONNECTED; + } } return state->status; @@ -882,7 +884,9 @@ NTSTATUS dcerpc_request_recv(struct rpc_request *req, while (req->state == RPC_REQUEST_PENDING) { struct event_context *ctx = dcerpc_event_context(req->p); - event_loop_once(ctx); + if (event_loop_once(ctx) != 0) { + return NT_STATUS_CONNECTION_DISCONNECTED; + } } *stub_data = req->payload; status = req->status; -- cgit