summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-03 11:34:37 +0100
committerStefan Metzmacher <metze@samba.org>2009-01-03 19:58:54 +0100
commit67810019a0bc3ab2d02f9506a3f93ee1fa3062ca (patch)
treea8d9774aa86dd1a1d58c1d06722e4deb35ce1bb5
parent2c8a10fe88a94e8d591d920487106f27b4e6f020 (diff)
downloadsamba-67810019a0bc3ab2d02f9506a3f93ee1fa3062ca.tar.gz
samba-67810019a0bc3ab2d02f9506a3f93ee1fa3062ca.tar.bz2
samba-67810019a0bc3ab2d02f9506a3f93ee1fa3062ca.zip
tevent: remove TEVENT_FD_AUTOCLOSE feature
TEVENT_FD_AUTOCLOSE adds a dependency to SOCKET_WRAPPER, which is bad. Callers should use tevent_fd_set_close_fn() now. metze
-rw-r--r--lib/tevent/tevent.h2
-rw-r--r--lib/tevent/tevent_aio.c3
-rw-r--r--lib/tevent/tevent_epoll.c3
-rw-r--r--lib/tevent/tevent_select.c3
-rw-r--r--lib/tevent/tevent_standard.c3
5 files changed, 0 insertions, 14 deletions
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index b02c7854bc..b57d96f5fb 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -120,7 +120,6 @@ void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags);
/* bits for file descriptor event flags */
#define TEVENT_FD_READ 1
#define TEVENT_FD_WRITE 2
-#define TEVENT_FD_AUTOCLOSE 4
#define TEVENT_FD_WRITEABLE(fde) \
tevent_fd_set_flags(fde, tevent_fd_get_flags(fde) | TEVENT_FD_WRITE)
@@ -200,7 +199,6 @@ int tevent_set_debug_stderr(struct tevent_context *ev);
#define EVENT_FD_READ TEVENT_FD_READ
#define EVENT_FD_WRITE TEVENT_FD_WRITE
-#define EVENT_FD_AUTOCLOSE TEVENT_FD_AUTOCLOSE
#define EVENT_FD_WRITEABLE(fde) \
TEVENT_FD_WRITEABLE(fde)
diff --git a/lib/tevent/tevent_aio.c b/lib/tevent/tevent_aio.c
index decdcc7bbc..f4ed6d8a5a 100644
--- a/lib/tevent/tevent_aio.c
+++ b/lib/tevent/tevent_aio.c
@@ -402,9 +402,6 @@ static int aio_event_fd_destructor(struct tevent_fd *fde)
if (fde->close_fn) {
fde->close_fn(ev, fde, fde->fd, fde->private_data);
fde->fd = -1;
- } else if (fde->flags & TEVENT_FD_AUTOCLOSE) {
- close(fde->fd);
- fde->fd = -1;
}
return 0;
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index b46598946f..023041981f 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -360,9 +360,6 @@ static int epoll_event_fd_destructor(struct tevent_fd *fde)
if (fde->close_fn) {
fde->close_fn(ev, fde, fde->fd, fde->private_data);
fde->fd = -1;
- } else if (fde->flags & TEVENT_FD_AUTOCLOSE) {
- close(fde->fd);
- fde->fd = -1;
}
return 0;
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c
index cca771ce85..d94e473db8 100644
--- a/lib/tevent/tevent_select.c
+++ b/lib/tevent/tevent_select.c
@@ -106,9 +106,6 @@ static int select_event_fd_destructor(struct tevent_fd *fde)
if (fde->close_fn) {
fde->close_fn(ev, fde, fde->fd, fde->private_data);
fde->fd = -1;
- } else if (fde->flags & TEVENT_FD_AUTOCLOSE) {
- close(fde->fd);
- fde->fd = -1;
}
return 0;
diff --git a/lib/tevent/tevent_standard.c b/lib/tevent/tevent_standard.c
index e7f1e5f970..145f510533 100644
--- a/lib/tevent/tevent_standard.c
+++ b/lib/tevent/tevent_standard.c
@@ -394,9 +394,6 @@ static int std_event_fd_destructor(struct tevent_fd *fde)
if (fde->close_fn) {
fde->close_fn(ev, fde, fde->fd, fde->private_data);
fde->fd = -1;
- } else if (fde->flags & TEVENT_FD_AUTOCLOSE) {
- close(fde->fd);
- fde->fd = -1;
}
return 0;