[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Fri Mar 26 05:18:44 MDT 2010
The branch, master has been updated
via 7728396... s3-event: switch s3 to using tevent_re_initialise()
from 789d67c... s4-smbd: use tevent_re_initialise()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 772839640e11664e1b1304d7f95146613d6ac1ac
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Mar 26 22:07:50 2010 +1100
s3-event: switch s3 to using tevent_re_initialise()
This correctly initialises the event backend, and checks for errors
(thanks to Metze for suggesting this)
-----------------------------------------------------------------------
Summary of changes:
source3/include/event.h | 1 -
source3/lib/events.c | 6 ------
source3/lib/util.c | 4 ++--
3 files changed, 2 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/include/event.h b/source3/include/event.h
index 21c2eb5..493bc15 100644
--- a/source3/include/event.h
+++ b/source3/include/event.h
@@ -34,7 +34,6 @@ bool run_events(struct event_context *event_ctx,
int selrtn, fd_set *read_fds, fd_set *write_fds);
struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
struct timeval *to_ret);
-void event_context_reinit(struct event_context *ev);
void dump_event_list(struct event_context *event_ctx);
struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx);
diff --git a/source3/lib/events.c b/source3/lib/events.c
index 651b251..21a13b6 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -192,12 +192,6 @@ static int s3_event_loop_once(struct tevent_context *ev, const char *location)
return 0;
}
-void event_context_reinit(struct tevent_context *ev)
-{
- tevent_common_context_destructor(ev);
- return;
-}
-
static int s3_event_context_init(struct tevent_context *ev)
{
return 0;
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 68f26b8..2339cfc 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -931,8 +931,8 @@ NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx,
goto done;
}
- if (ev_ctx) {
- event_context_reinit(ev_ctx);
+ if (ev_ctx && tevent_re_initialise(ev_ctx) != 0) {
+ smb_panic(__location__ ": Failed to re-initialise event context");
}
if (msg_ctx) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list