diff options
author | Volker Lendecke <vl@samba.org> | 2009-04-08 23:03:59 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-04-08 23:11:59 +0200 |
commit | ccd293ba0e7eede1115c6f2f7de36bc38b59c02f (patch) | |
tree | 32570d10541b3539f5257917cdb84338f4eb0bd8 /lib/async_req/async_sock.c | |
parent | cf7d26933b630006428c827df69728f4eab01e37 (diff) | |
download | samba-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.c | 50 |
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; |