summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-11 04:28:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:18 -0500
commit2d60d3b4927e582b17322abce925bf01ac0475d0 (patch)
treefcda2cb8b8e4284386bd093eef887ca84e3067ad
parent2059aa0949b831c362b30d82ccba8a7c8cb1c601 (diff)
downloadsamba-2d60d3b4927e582b17322abce925bf01ac0475d0.tar.gz
samba-2d60d3b4927e582b17322abce925bf01ac0475d0.tar.bz2
samba-2d60d3b4927e582b17322abce925bf01ac0475d0.zip
r18358: handle errors in the RPC-LSA async test
(This used to be commit d46c3be9f9db6666be52b5584b0210da925106d1)
-rw-r--r--source4/torture/rpc/lsa.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 6388f61cf0..ab55f13ac5 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -525,7 +525,9 @@ static void lookupsids_cb(struct rpc_request *req)
*replies = -1;
}
- *replies += 1;
+ if (*replies >= 0) {
+ *replies += 1;
+ }
}
static BOOL test_LookupSids_async(struct dcerpc_pipe *p,
@@ -579,16 +581,16 @@ static BOOL test_LookupSids_async(struct dcerpc_pipe *p,
req[i]->async.private = &replies;
}
- while (replies < num_async_requests) {
+ while (replies >= 0 && replies < num_async_requests) {
event_loop_once(p->conn->event_ctx);
- if (replies < 0) {
- ret = False;
- break;
- }
}
talloc_free(req);
+ if (replies < 0) {
+ ret = False;
+ }
+
return ret;
}