summaryrefslogtreecommitdiff
path: root/source3/lib/async_sock.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2008-12-01 08:23:35 +0100
committerVolker Lendecke <vl@samba.org>2008-12-08 22:09:33 +0100
commit7fbb64d726f23da49cd2f07e1a678ed575b70bfa (patch)
tree8b58be1fa57d5763f4b6be67105f05aeae644072 /source3/lib/async_sock.c
parentf9aa69ae352f7f441b04976575b96ecc8b844dbd (diff)
downloadsamba-7fbb64d726f23da49cd2f07e1a678ed575b70bfa.tar.gz
samba-7fbb64d726f23da49cd2f07e1a678ed575b70bfa.tar.bz2
samba-7fbb64d726f23da49cd2f07e1a678ed575b70bfa.zip
Simplify async programming a bit with helper routines
Introduce async_req_is_error() and async_req_simple_recv()
Diffstat (limited to 'source3/lib/async_sock.c')
-rw-r--r--source3/lib/async_sock.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source3/lib/async_sock.c b/source3/lib/async_sock.c
index ba860e8e78..225cc7b195 100644
--- a/source3/lib/async_sock.c
+++ b/source3/lib/async_sock.c
@@ -364,11 +364,7 @@ struct async_req *sendall_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
NTSTATUS sendall_recv(struct async_req *req)
{
- SMB_ASSERT(req->state >= ASYNC_REQ_DONE);
- if (req->state == ASYNC_REQ_ERROR) {
- return req->status;
- }
- return NT_STATUS_OK;
+ return async_req_simple_recv(req);
}
/**
@@ -518,11 +514,7 @@ struct async_req *recvall_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
NTSTATUS recvall_recv(struct async_req *req)
{
- SMB_ASSERT(req->state >= ASYNC_REQ_DONE);
- if (req->state == ASYNC_REQ_ERROR) {
- return req->status;
- }
- return NT_STATUS_OK;
+ return async_req_simple_recv(req);
}
/**