From 022e2f81991f12637ca0eeb3a030d4cec69d6fb9 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 5 Jan 2009 19:47:45 +0800 Subject: clean event context after child is forked. Signed-off-by: Stefan Metzmacher --- source3/printing/print_cups.c | 3 ++- source3/printing/printing.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index 5fb1d379a63..d75d635779d 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -425,7 +425,8 @@ static bool cups_pcap_load_async(int *pfd) } /* Child. */ - if (!reinit_after_fork(smbd_messaging_context(), true)) { + if (!reinit_after_fork(smbd_messaging_context(), + smbd_event_context(), true)) { DEBUG(0,("cups_pcap_load_async: reinit_after_fork() failed\n")); smb_panic("cups_pcap_load_async: reinit_after_fork() failed"); } diff --git a/source3/printing/printing.c b/source3/printing/printing.c index ba88f8ee566..0f38aeab806 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1421,7 +1421,8 @@ void start_background_queue(void) close(pause_pipe[0]); pause_pipe[0] = -1; - if (!reinit_after_fork(smbd_messaging_context(), true)) { + if (!reinit_after_fork(smbd_messaging_context(), + smbd_event_context(), true)) { DEBUG(0,("reinit_after_fork() failed\n")); smb_panic("reinit_after_fork() failed"); } -- cgit From c34d5f445aae8180650dd2cae994bd5573870c04 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 5 Jan 2009 10:22:50 +0100 Subject: s3:events: change event_add_timed() prototype to match samba4 metze --- source3/printing/notify.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/printing') diff --git a/source3/printing/notify.c b/source3/printing/notify.c index b24a8a52f59..860a400d649 100644 --- a/source3/printing/notify.c +++ b/source3/printing/notify.c @@ -221,7 +221,7 @@ void print_notify_send_messages(struct messaging_context *msg_ctx, static void print_notify_event_send_messages(struct event_context *event_ctx, struct timed_event *te, - const struct timeval *now, + struct timeval now, void *private_data) { /* Remove this timed event handler. */ @@ -326,7 +326,6 @@ to notify_queue_head\n", msg->type, msg->field, msg->printer)); /* Add an event for 1 second's time to send this queue. */ notify_event = event_add_timed(smbd_event_context(), NULL, timeval_current_ofs(1,0), - "print_notify", print_notify_event_send_messages, NULL); } -- cgit