mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
Remove lpq as root fix - do this in print_job_start instead
as part of print queue length processing. Jeremy.
This commit is contained in:
parent
6581066b93
commit
e85a0fadd8
@ -1787,7 +1787,6 @@ int print_queue_snum(char *qname);
|
||||
BOOL print_queue_pause(struct current_user *user, int snum, int *errcode);
|
||||
BOOL print_queue_resume(struct current_user *user, int snum, int *errcode);
|
||||
BOOL print_queue_purge(struct current_user *user, int snum, int *errcode);
|
||||
void process_print_queue(time_t t);
|
||||
#endif
|
||||
|
||||
/*The following definitions come from profile/profile.c */
|
||||
|
@ -1024,32 +1024,4 @@ BOOL print_queue_purge(struct current_user *user, int snum, int *errcode)
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Periodically run a status on all the queues to ensure the tdb doesn't grow.
|
||||
Note that this will have no effect if the client is doing its own status
|
||||
queries. This code is here to clean up jobs submitted by non-Windows printer
|
||||
clients (eg. smbclient) that never do a status check.
|
||||
****************************************************************************/
|
||||
|
||||
void process_print_queue(time_t t)
|
||||
{
|
||||
static time_t last_check_time;
|
||||
int services = lp_numservices();
|
||||
print_queue_struct *queue;
|
||||
print_status_struct status;
|
||||
int snum;
|
||||
|
||||
if ((t != (time_t)-1) && ((t - last_check_time) < lp_lpqcachetime()))
|
||||
return;
|
||||
|
||||
last_check_time = t;
|
||||
|
||||
for (snum = 0; snum < services; snum++) {
|
||||
if (lp_snum_ok(snum) && lp_print_ok(snum) && lp_browseable(snum)) {
|
||||
(void)print_queue_status(snum, &queue,&status);
|
||||
safe_free(queue);
|
||||
}
|
||||
}
|
||||
}
|
||||
#undef OLD_NTDOMAIN
|
||||
|
@ -993,12 +993,6 @@ machine %s in domain %s.\n", global_myname, global_myworkgroup ));
|
||||
*/
|
||||
process_pending_change_notify_queue(t);
|
||||
|
||||
/*
|
||||
* Ensure the print queue tdb doesn't grow too
|
||||
* big by periodically scanning it.
|
||||
*/
|
||||
process_print_queue(t);
|
||||
|
||||
/*
|
||||
* Now we are root, check if the log files need pruning.
|
||||
*/
|
||||
|
@ -422,10 +422,6 @@ void exit_server(char *reason)
|
||||
|
||||
respond_to_all_remaining_local_messages();
|
||||
|
||||
/* Don't do this on every exit... */
|
||||
if (sys_random() % 10)
|
||||
process_print_queue(time(NULL));
|
||||
|
||||
#ifdef WITH_DFS
|
||||
if (dcelogin_atmost_once) {
|
||||
dfs_unlogin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user