diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-08 15:39:48 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-08 18:09:33 +0200 |
commit | 31d23c83fef2b67c3afa4cf1d1f409086f92649d (patch) | |
tree | ae0a38429b9a810a0f45deb9732e9ec7d5dbaf72 | |
parent | bc760e79c868c11af9771c0179c18c9d543b9294 (diff) | |
download | samba-31d23c83fef2b67c3afa4cf1d1f409086f92649d.tar.gz samba-31d23c83fef2b67c3afa4cf1d1f409086f92649d.tar.bz2 samba-31d23c83fef2b67c3afa4cf1d1f409086f92649d.zip |
s3: Lift the server_messaging_context from print_queue_update
-rw-r--r-- | source3/printing/printing.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 8fff73d054..3140e34e65 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1571,7 +1571,8 @@ void start_background_queue(struct tevent_context *ev, update the internal database from the system print queue for a queue ****************************************************************************/ -static void print_queue_update(int snum, bool force) +static void print_queue_update(struct messaging_context *msg_ctx, + int snum, bool force) { fstring key; fstring sharename; @@ -1690,8 +1691,7 @@ static void print_queue_update(int snum, bool force) /* finally send the message */ - messaging_send_buf(server_messaging_context(), - pid_to_procid(background_lpq_updater_pid), + messaging_send_buf(msg_ctx, pid_to_procid(background_lpq_updater_pid), MSG_PRINTER_UPDATE, (uint8 *)buffer, len); SAFE_FREE( buffer ); @@ -2162,7 +2162,7 @@ pause, or resume print job. User name: %s. Printer name: %s.", /* force update the database and say the delete failed if the job still exists */ - print_queue_update(snum, True); + print_queue_update(msg_ctx, snum, True); pjob = print_job_find(sharename, jobid); if (pjob && (pjob->status != LPQ_DELETING)) { @@ -2376,7 +2376,7 @@ int print_queue_length(int snum, print_status_struct *pstatus) /* make sure the database is up to date */ if (print_cache_expired(lp_const_servicename(snum), True)) - print_queue_update(snum, False); + print_queue_update(server_messaging_context(), snum, False); /* also fetch the queue status */ memset(&status, 0, sizeof(status)); @@ -2833,7 +2833,7 @@ NTSTATUS print_job_end(int snum, uint32 jobid, enum file_close_type close_type) /* make sure the database is up to date */ if (print_cache_expired(lp_const_servicename(snum), True)) - print_queue_update(snum, False); + print_queue_update(server_messaging_context(), snum, False); return NT_STATUS_OK; @@ -2866,7 +2866,7 @@ static bool get_stored_queue_info(struct tdb_print_db *pdb, int snum, int *pcoun /* make sure the database is up to date */ if (print_cache_expired(lp_const_servicename(snum), True)) - print_queue_update(snum, False); + print_queue_update(server_messaging_context(), snum, False); *pcount = 0; *ppqueue = NULL; @@ -2982,7 +2982,7 @@ int print_queue_status(int snum, /* make sure the database is up to date */ if (print_cache_expired(lp_const_servicename(snum), True)) - print_queue_update(snum, False); + print_queue_update(server_messaging_context(), snum, False); /* return if we are done */ if ( !ppqueue || !status ) @@ -3091,7 +3091,7 @@ WERROR print_queue_resume(struct auth_serversupplied_info *server_info, /* make sure the database is up to date */ if (print_cache_expired(lp_const_servicename(snum), True)) - print_queue_update(snum, True); + print_queue_update(msg_ctx, snum, True); /* Send a printer notify message */ @@ -3113,7 +3113,7 @@ WERROR print_queue_purge(struct auth_serversupplied_info *server_info, bool can_job_admin; /* Force and update so the count is accurate (i.e. not a cached count) */ - print_queue_update(snum, True); + print_queue_update(msg_ctx, snum, True); can_job_admin = print_access_check(server_info, msg_ctx, @@ -3137,7 +3137,7 @@ WERROR print_queue_purge(struct auth_serversupplied_info *server_info, unbecome_root(); /* update the cache */ - print_queue_update( snum, True ); + print_queue_update(msg_ctx, snum, True); SAFE_FREE(queue); |