diff options
author | Volker Lendecke <vl@samba.org> | 2013-10-27 15:27:45 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2013-10-28 08:26:42 +0100 |
commit | 871e60297fd6823bc9f7479f2375f092091958c2 (patch) | |
tree | 2c9e91e8b5edc0a9938baf10205f0be494b492a6 | |
parent | 00132ab65c1b577d7dabf665f5e32ecf2620a2ab (diff) | |
download | samba-871e60297fd6823bc9f7479f2375f092091958c2.tar.gz samba-871e60297fd6823bc9f7479f2375f092091958c2.tar.bz2 samba-871e60297fd6823bc9f7479f2375f092091958c2.zip |
rpc_server: Fix some uses of tevent_req_nomem
tevent_req_nomem is to be used in a sequence of async actions where we
have one main request. This is a completely independent loop without one
central tevent_req. tevent_req_nomem is used as a simple way to signal
an out of memory condition to the main request representing the async
sequence. If we don't have such a tevent_req, we need to directly check
for NULL.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r-- | source3/rpc_server/rpc_ep_register.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/rpc_server/rpc_ep_register.c b/source3/rpc_server/rpc_ep_register.c index d840c2e09e..1b8ea0918c 100644 --- a/source3/rpc_server/rpc_ep_register.c +++ b/source3/rpc_server/rpc_ep_register.c @@ -83,7 +83,7 @@ NTSTATUS rpc_ep_register(struct tevent_context *ev_ctx, req = tevent_wakeup_send(state->mem_ctx, state->ev_ctx, timeval_current_ofs(1, 0)); - if (tevent_req_nomem(state->mem_ctx, req)) { + if (req == NULL) { talloc_free(state); return NT_STATUS_NO_MEMORY; } @@ -121,7 +121,7 @@ static void rpc_ep_register_loop(struct tevent_req *subreq) subreq = tevent_wakeup_send(state->mem_ctx, state->ev_ctx, timeval_current_ofs(MONITOR_WAIT_TIME, 0)); - if (tevent_req_nomem(state->mem_ctx, subreq)) { + if (subreq == NULL) { talloc_free(state); return; } @@ -140,7 +140,7 @@ static void rpc_ep_register_loop(struct tevent_req *subreq) subreq = tevent_wakeup_send(state->mem_ctx, state->ev_ctx, timeval_current_ofs(state->wait_time, 0)); - if (tevent_req_nomem(state->mem_ctx, subreq)) { + if (subreq == NULL) { talloc_free(state); return; } @@ -258,7 +258,7 @@ static void rpc_ep_monitor_loop(struct tevent_req *subreq) subreq = tevent_wakeup_send(state->mem_ctx, state->ev_ctx, timeval_current_ofs(MONITOR_WAIT_TIME, 0)); - if (tevent_req_nomem(state->mem_ctx, subreq)) { + if (subreq == NULL) { talloc_free(state); return; } |