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/torture/rpc/echo.c | 4 +++- source4/torture/rpc/netlogon.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index 925b483288..43c794e040 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -237,7 +237,9 @@ static BOOL test_sleep(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) ctx = dcerpc_event_context(p); while (total_done < ASYNC_COUNT) { - event_loop_once(ctx); + if (event_loop_once(ctx) != 0) { + return False; + } for (i=0;istate == RPC_REQUEST_DONE) { total_done++; diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index fba39c14c9..6e4f85be40 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -1706,7 +1706,9 @@ static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) /* even with this flush per request a w2k3 server seems to clag with multiple outstanding requests. bleergh. */ - event_loop_once(dcerpc_event_context(p)); + if (event_loop_once(dcerpc_event_context(p)) != 0) { + return False; + } } for (i=0;i