summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-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;
}