diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-09 16:43:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:13 -0500 |
commit | 96180f2cac8ebcbd7e2d683e891011697357dc9f (patch) | |
tree | 20e28a267217db48155b02c904c0113111047ac7 /source4/lib | |
parent | 2e4d4a9e28ddd84e245e45c2c58f9cc6e8e2967f (diff) | |
download | samba-96180f2cac8ebcbd7e2d683e891011697357dc9f.tar.gz samba-96180f2cac8ebcbd7e2d683e891011697357dc9f.tar.bz2 samba-96180f2cac8ebcbd7e2d683e891011697357dc9f.zip |
r12140: - add an additional_flags field to the fd_event struct, so that
the events backend can store private flags
- add function to access the gtk event loop ops struct
metze
(This used to be commit a5cc0758a393f36a770cdd57e317214d03934c13)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/events/events_internal.h | 1 | ||||
-rw-r--r-- | source4/lib/events/events_liboop.c | 7 | ||||
-rw-r--r-- | source4/lib/events/events_standard.c | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/events/events_internal.h b/source4/lib/events/events_internal.h index 9fc5a2065f..de4e5f6a5a 100644 --- a/source4/lib/events/events_internal.h +++ b/source4/lib/events/events_internal.h @@ -56,6 +56,7 @@ struct fd_event { /* this is private for the specific handler */ void *private_data; /* this is private for the events_ops implementation */ + uint16_t additional_flags; void *additional_data; }; diff --git a/source4/lib/events/events_liboop.c b/source4/lib/events/events_liboop.c index b17ea21505..c81449e65e 100644 --- a/source4/lib/events/events_liboop.c +++ b/source4/lib/events/events_liboop.c @@ -127,6 +127,7 @@ static struct fd_event *oop_event_add_fd(struct event_context *ev, TALLOC_CTX *m fde->flags = flags; fde->handler = handler; fde->private_data = private_data; + fde->additional_flags = 0; fde->additional_data = NULL; if (fde->flags & EVENT_FD_READ) @@ -269,7 +270,7 @@ static int oop_event_loop_wait(struct event_context *ev) return -1; } -static const struct event_ops events_oop_ops = { +static const struct event_ops event_oop_ops = { .context_init = oop_event_context_init, .add_fd = oop_event_add_fd, .get_fd_flags = oop_event_get_fd_flags, @@ -279,7 +280,7 @@ static const struct event_ops events_oop_ops = { .loop_wait = oop_event_loop_wait, }; -const struct event_ops *events_oop_get_ops(void) +const struct event_ops *event_liboop_get_ops(void) { - return &events_oop_ops; + return &event_oop_ops; } diff --git a/source4/lib/events/events_standard.c b/source4/lib/events/events_standard.c index 1a3bdc1e16..cab1ab52b9 100644 --- a/source4/lib/events/events_standard.c +++ b/source4/lib/events/events_standard.c @@ -209,6 +209,7 @@ static struct fd_event *std_event_add_fd(struct event_context *ev, TALLOC_CTX *m fde->flags = flags; fde->handler = handler; fde->private_data = private_data; + fde->additional_flags = 0; fde->additional_data = NULL; DLIST_ADD(std_ev->fd_events, fde); |