summaryrefslogtreecommitdiff
path: root/lib/async_req/async_sock.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-08 23:03:59 +0200
committerVolker Lendecke <vl@samba.org>2009-04-08 23:11:59 +0200
commitccd293ba0e7eede1115c6f2f7de36bc38b59c02f (patch)
tree32570d10541b3539f5257917cdb84338f4eb0bd8 /lib/async_req/async_sock.c
parentcf7d26933b630006428c827df69728f4eab01e37 (diff)
downloadsamba-ccd293ba0e7eede1115c6f2f7de36bc38b59c02f.tar.gz
samba-ccd293ba0e7eede1115c6f2f7de36bc38b59c02f.tar.bz2
samba-ccd293ba0e7eede1115c6f2f7de36bc38b59c02f.zip
Remove async_req
Diffstat (limited to 'lib/async_req/async_sock.c')
-rw-r--r--lib/async_req/async_sock.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index 39705f45bb..543972815d 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -20,7 +20,6 @@
#include "includes.h"
#include "lib/talloc/talloc.h"
#include "lib/tevent/tevent.h"
-#include "lib/async_req/async_req.h"
#include "lib/async_req/async_sock.h"
#include "lib/util/tevent_unix.h"
#include <fcntl.h>
@@ -29,55 +28,6 @@
#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
#endif
-/**
- * @brief Map async_req states to unix-style errnos
- * @param[in] req The async req to get the state from
- * @param[out] err Pointer to take the unix-style errno
- *
- * @return true if the async_req is in an error state, false otherwise
- */
-
-bool async_req_is_errno(struct async_req *req, int *err)
-{
- enum async_req_state state;
- uint64_t error;
-
- if (!async_req_is_error(req, &state, &error)) {
- return false;
- }
-
- switch (state) {
- case ASYNC_REQ_USER_ERROR:
- *err = (int)error;
- break;
- case ASYNC_REQ_TIMED_OUT:
-#ifdef ETIMEDOUT
- *err = ETIMEDOUT;
-#else
- *err = EAGAIN;
-#endif
- break;
- case ASYNC_REQ_NO_MEMORY:
- *err = ENOMEM;
- break;
- default:
- *err = EIO;
- break;
- }
- return true;
-}
-
-int async_req_simple_recv_errno(struct async_req *req)
-{
- int err;
-
- if (async_req_is_errno(req, &err)) {
- return err;
- }
-
- return 0;
-}
-
struct async_send_state {
int fd;
const void *buf;