[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Thu Mar 10 02:25:01 MST 2011
The branch, master has been updated
via 494d497 tevent: change version to 0.9.11
via b7d5ddf tevent/poll: use fde->additional_flags to hold the array index
via 20284f2 tevent: change tevent_fd->additional_flags to uint64_t
from 494aed5 s4:lib/socket: use sockaddr_in6 in ipv6_tcp_accept()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 494d497b99df08603555ff6a981482937d44b124
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Mar 2 15:24:40 2011 +0100
tevent: change version to 0.9.11
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Thu Mar 10 10:24:49 CET 2011 on sn-devel-104
commit b7d5ddfa61d3b4c797dcee64cb23eb97cc55759c
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Mar 2 15:22:09 2011 +0100
tevent/poll: use fde->additional_flags to hold the array index
metze
commit 20284f2a8429b5250ffb70e7124fa81115385c58
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Mar 2 15:20:46 2011 +0100
tevent: change tevent_fd->additional_flags to uint64_t
metze
-----------------------------------------------------------------------
Summary of changes:
.../ABI/{tevent-0.9.10.sigs => tevent-0.9.11.sigs} | 0
lib/tevent/tevent_internal.h | 2 +-
lib/tevent/tevent_poll.c | 23 +++++--------------
lib/tevent/wscript | 2 +-
4 files changed, 8 insertions(+), 19 deletions(-)
copy lib/tevent/ABI/{tevent-0.9.10.sigs => tevent-0.9.11.sigs} (100%)
Changeset truncated at 500 lines:
diff --git a/lib/tevent/ABI/tevent-0.9.10.sigs b/lib/tevent/ABI/tevent-0.9.11.sigs
similarity index 100%
copy from lib/tevent/ABI/tevent-0.9.10.sigs
copy to lib/tevent/ABI/tevent-0.9.11.sigs
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index 3d71bfd..9227f90 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -162,7 +162,7 @@ struct tevent_fd {
const char *handler_name;
const char *location;
/* this is private for the events_ops implementation */
- uint16_t additional_flags;
+ uint64_t additional_flags;
void *additional_data;
};
diff --git a/lib/tevent/tevent_poll.c b/lib/tevent/tevent_poll.c
index cda028a..712255b 100644
--- a/lib/tevent/tevent_poll.c
+++ b/lib/tevent/tevent_poll.c
@@ -35,7 +35,7 @@ struct poll_event_context {
*/
struct pollfd *fds;
struct tevent_fd **fd_events;
- int num_fds;
+ uint64_t num_fds;
/* information for exiting from the event loop */
int exit_code;
@@ -64,7 +64,7 @@ static int poll_event_fd_destructor(struct tevent_fd *fde)
struct tevent_context *ev = fde->event_ctx;
struct poll_event_context *poll_ev = NULL;
struct tevent_fd *moved_fde;
- long del_idx;
+ uint64_t del_idx = fde->additional_flags;
if (ev == NULL) {
goto done;
@@ -73,15 +73,10 @@ static int poll_event_fd_destructor(struct tevent_fd *fde)
poll_ev = talloc_get_type_abort(
ev->additional_data, struct poll_event_context);
- /*
- * Assume a void * can carry enough bits to hold num_fds.
- */
- del_idx = (long)(fde->additional_data);
-
moved_fde = poll_ev->fd_events[poll_ev->num_fds-1];
poll_ev->fd_events[del_idx] = moved_fde;
poll_ev->fds[del_idx] = poll_ev->fds[poll_ev->num_fds-1];
- moved_fde->additional_data = (void *)del_idx;
+ moved_fde->additional_flags = del_idx;
poll_ev->num_fds -= 1;
done:
@@ -149,10 +144,7 @@ static struct tevent_fd *poll_event_add_fd(struct tevent_context *ev,
pfd->events |= (POLLOUT);
}
- /*
- * Assume a void * can carry enough bits to hold num_fds.
- */
- fde->additional_data = (void *)(long)poll_ev->num_fds;
+ fde->additional_flags = poll_ev->num_fds;
poll_ev->fd_events[poll_ev->num_fds] = fde;
poll_ev->num_fds += 1;
@@ -169,7 +161,7 @@ static void poll_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
{
struct poll_event_context *poll_ev = talloc_get_type_abort(
fde->event_ctx->additional_data, struct poll_event_context);
- long idx;
+ uint64_t idx = fde->additional_flags;
uint16_t pollflags = 0;
if (flags & TEVENT_FD_READ) {
@@ -179,7 +171,6 @@ static void poll_event_set_fd_flags(struct tevent_fd *fde, uint16_t flags)
pollflags |= (POLLOUT);
}
- idx = (long)(fde->additional_data);
poll_ev->fds[idx].events = pollflags;
fde->flags = flags;
@@ -237,11 +228,9 @@ static int poll_event_loop_poll(struct tevent_context *ev,
the handler to remove itself when called */
for (fde = ev->fd_events; fde; fde = fde->next) {
struct pollfd *pfd;
- long pfd_idx;
+ uint64_t pfd_idx = fde->additional_flags;
uint16_t flags = 0;
- pfd_idx = (long)(fde->additional_data);
-
pfd = &poll_ev->fds[pfd_idx];
if (pfd->revents & (POLLIN|POLLHUP|POLLERR)) {
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 07143c1..7ccaf0a 100644
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
APPNAME = 'tevent'
-VERSION = '0.9.10'
+VERSION = '0.9.11'
blddir = 'bin'
--
Samba Shared Repository
More information about the samba-cvs
mailing list