summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-17 12:59:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:13 -0500
commitbf219447a35d86913c1a643b66d993986a651360 (patch)
treeabd6650e6694233de6d6f8e197a03b513ecaec56 /source3/nsswitch/winbindd.c
parent60c1a8e5a8f905a5ae703dac05ed2f440875ad5d (diff)
downloadsamba-bf219447a35d86913c1a643b66d993986a651360.tar.gz
samba-bf219447a35d86913c1a643b66d993986a651360.tar.bz2
samba-bf219447a35d86913c1a643b66d993986a651360.zip
r20846: Before this gets out of control...
This add a struct event_context and infrastructure for fd events to smbd. This is step zero to import lib/events. Jeremy, I rely on you to watch the change in receive_message_or_smb() closely. For the normal code path this should be the only relevant change. The rest is either not yet used or is cosmetic. Volker (This used to be commit cd07f93a8aecb24c056e33b1ad3447a41959810f)
Diffstat (limited to 'source3/nsswitch/winbindd.c')
-rw-r--r--source3/nsswitch/winbindd.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index 049bc47aba..1a3e761adc 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -34,6 +34,16 @@ static BOOL interactive = False;
extern BOOL override_logfile;
+struct event_context *winbind_event_context(void)
+{
+ static struct event_context *ctx;
+
+ if (!ctx && !(ctx = event_context_init(NULL))) {
+ smb_panic("Could not init smbd event context\n");
+ }
+ return ctx;
+}
+
/* Reload configuration */
static BOOL reload_services_file(void)
@@ -716,7 +726,7 @@ static void process_loop(void)
message_dispatch();
- run_events();
+ run_events(winbind_event_context(), 0, NULL, NULL);
/* refresh the trusted domain cache */
@@ -748,7 +758,7 @@ static void process_loop(void)
timeout.tv_usec = 0;
/* Check for any event timeouts. */
- if (get_timed_events_timeout(&ev_timeout)) {
+ if (get_timed_events_timeout(winbind_event_context(), &ev_timeout)) {
timeout = timeval_min(&timeout, &ev_timeout);
}