diff options
author | Andreas Schneider <asn@samba.org> | 2011-07-08 11:28:12 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2011-07-14 16:10:47 +0200 |
commit | 8b085c02eba4beeb38c1d4ca9635e830a7658ea8 (patch) | |
tree | 09c98b88b5f3fef7689662d39fd5599a26a34340 | |
parent | 68520ec02cafde1f38e8630b67292d921ce30f34 (diff) | |
download | samba-8b085c02eba4beeb38c1d4ca9635e830a7658ea8.tar.gz samba-8b085c02eba4beeb38c1d4ca9635e830a7658ea8.tar.bz2 samba-8b085c02eba4beeb38c1d4ca9635e830a7658ea8.zip |
s3-smbd: Pass event and messaging context to smbd_parent_housekeeping().
-rw-r--r-- | source3/smbd/server.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 30d4ecf064..6fc2a14fc4 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -585,6 +585,8 @@ static bool smbd_open_one_socket(struct smbd_parent_context *parent, static bool smbd_parent_housekeeping(const struct timeval *now, void *private_data) { + struct messaging_context *msg_ctx = + talloc_get_type_abort(private_data, struct messaging_context); time_t printcap_cache_time = (time_t)lp_printcap_cache_time(); time_t t = time_mono(NULL); @@ -594,8 +596,8 @@ static bool smbd_parent_housekeeping(const struct timeval *now, void *private_da if ((printcap_cache_time != 0) && (t >= (last_printer_reload_time + printcap_cache_time))) { DEBUG( 3,( "Printcap cache time expired.\n")); - pcap_cache_reload(server_event_context(), - smbd_messaging_context(), + pcap_cache_reload(messaging_event_context(msg_ctx), + msg_ctx, &reload_pcap_change_notify); last_printer_reload_time = t; } @@ -756,7 +758,7 @@ static bool open_sockets_smbd(struct smbd_parent_context *parent, if (!(event_add_idle(ev_ctx, NULL, timeval_set(SMBD_HOUSEKEEPING_INTERVAL, 0), "parent_housekeeping", smbd_parent_housekeeping, - NULL))) { + msg_ctx))) { DEBUG(0, ("Could not add parent_housekeeping event\n")); return false; } |