1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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
This commit is contained in:
Stefan Metzmacher 2009-01-03 11:34:37 +01:00
parent 2c8a10fe88
commit 67810019a0
5 changed files with 0 additions and 14 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;