summaryrefslogtreecommitdiff
path: root/lib/async_req
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-25 12:38:32 +0100
committerVolker Lendecke <vl@samba.org>2009-02-25 13:04:18 +0100
commit00ad0c4a4317db810bf2197503006ae5a6bb8bce (patch)
tree6f26715c688dbc441b3202d5010d39e48233063d /lib/async_req
parentd1c7bbd893c27ebff28571b4ea611bd3e35148c1 (diff)
downloadsamba-00ad0c4a4317db810bf2197503006ae5a6bb8bce.tar.gz
Remove async_req based async_recv
Diffstat (limited to 'lib/async_req')
-rw-r--r--lib/async_req/async_sock.c68
-rw-r--r--lib/async_req/async_sock.h3
2 files changed, 0 insertions, 71 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 3563421e0e5..302265c8053 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -310,74 +310,6 @@ struct async_req *async_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
return result;
}
-/**
- * fde event handler for the "recv" syscall
- * @param[in] ev The event context that sent us here
- * @param[in] fde The file descriptor event associated with the recv
- * @param[in] flags Can only be TEVENT_FD_READ here
- * @param[in] priv private data, "struct async_req *" in this case
- */
-
-static void async_recv_callback(struct tevent_context *ev,
- struct tevent_fd *fde, uint16_t flags,
- void *priv)
-{
- struct async_req *req = talloc_get_type_abort(
- priv, struct async_req);
- struct async_syscall_state *state = talloc_get_type_abort(
- req->private_data, struct async_syscall_state);
- struct param_recv *p = &state->param.param_recv;
-
- if (state->syscall_type != ASYNC_SYSCALL_RECV) {
- async_req_error(req, EIO);
- return;
- }
-
- state->result.result_ssize_t = recv(p->fd, p->buffer, p->length,
- p->flags);
- state->sys_errno = errno;
-
- TALLOC_FREE(state->fde);
-
- async_req_done(req);
-}
-
-/**
- * Async version of recv(2)
- * @param[in] mem_ctx The memory context to hang the result off
- * @param[in] ev The event context to work from
- * @param[in] fd The socket to recv from
- * @param[in] buffer The buffer to recv into
- * @param[in] length How many bytes to recv
- * @param[in] flags flags passed to recv(2)
- *
- * This function is a direct counterpart of recv(2)
- */
-
-struct async_req *async_recv(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- int fd, void *buffer, size_t length,
- int flags)
-{
- struct async_req *result;
- struct async_syscall_state *state;
-
- result = async_fde_syscall_new(
- mem_ctx, ev, ASYNC_SYSCALL_RECV,
- fd, TEVENT_FD_READ, async_recv_callback,
- &state);
-
- if (result == NULL) {
- return NULL;
- }
-
- state->param.param_recv.fd = fd;
- state->param.param_recv.buffer = buffer;
- state->param.param_recv.length = length;
- state->param.param_recv.flags = flags;
-
- return result;
-}
-
struct async_send_state {
int fd;
const void *buf;
diff --git a/lib/async_req/async_sock.h b/lib/async_req/async_sock.h
index bfc4346d39a..1d0558b41ea 100644
--- a/lib/async_req/async_sock.h
+++ b/lib/async_req/async_sock.h
@@ -32,9 +32,6 @@ int async_syscall_result_int(struct async_req *req, int *perrno);
struct async_req *async_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
int fd, const void *buffer, size_t length,
int flags);
-struct async_req *async_recv(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- int fd, void *buffer, size_t length,
- int flags);
struct tevent_req *async_send_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,