diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 18:43:37 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 23:37:46 +0200 |
commit | 1702b17494523ff7fad513268bad59148a08ac5b (patch) | |
tree | a5a2b4e0378a1bd417768cb1134eb1a62b3707c3 /source3/smbd | |
parent | e64bd85d90b2ccb6ee89bb5d4c5d50d3f991d423 (diff) | |
download | samba-1702b17494523ff7fad513268bad59148a08ac5b.tar.gz samba-1702b17494523ff7fad513268bad59148a08ac5b.tar.bz2 samba-1702b17494523ff7fad513268bad59148a08ac5b.zip |
s3: Lift the server_messaging_context from housekeeping_fn
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/process.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 1d00e12c7e..1d292952eb 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -2466,13 +2466,15 @@ static bool deadtime_fn(const struct timeval *now, void *private_data) static bool housekeeping_fn(const struct timeval *now, void *private_data) { + struct messaging_context *msg_ctx = talloc_get_type_abort( + private_data, struct messaging_context); change_to_root_user(); /* update printer queue caches if necessary */ - update_monitored_printq_cache(smbd_messaging_context()); + update_monitored_printq_cache(msg_ctx); /* check if we need to reload services */ - check_reload(smbd_messaging_context(), time(NULL)); + check_reload(msg_ctx, time(NULL)); /* Change machine password if neccessary. */ attempt_machine_password_change(); @@ -3044,7 +3046,8 @@ void smbd_process(void) if (!(event_add_idle(smbd_event_context(), NULL, timeval_set(SMBD_SELECT_TIMEOUT, 0), - "housekeeping", housekeeping_fn, NULL))) { + "housekeeping", housekeeping_fn, + smbd_messaging_context()))) { DEBUG(0, ("Could not add housekeeping event\n")); exit(1); } |