diff options
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r-- | source3/printing/printing.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index a46fff0de2..3bf992ad69 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -1595,6 +1595,8 @@ static BOOL allocate_print_jobid(struct tdb_print_db *pdb, int snum, const char if (i > 2) { DEBUG(0, ("allocate_print_jobid: failed to allocate a print job for queue %s\n", printername )); + /* Probably full... */ + errno = ENOSPC; return False; } @@ -1669,13 +1671,16 @@ uint32 print_job_start(struct current_user *user, int snum, char *jobname, NT_DE /* Insure the maximum queue size is not violated */ if ((njobs = print_queue_length(snum,NULL)) > lp_maxprintjobs(snum)) { - DEBUG(3, ("print_job_start: number of jobs (%d) larger than max printjobs per queue (%d).\n", - njobs, lp_maxprintjobs(snum) )); + DEBUG(3, ("print_job_start: Queue %s number of jobs (%d) larger than max printjobs per queue (%d).\n", + printername, njobs, lp_maxprintjobs(snum) )); release_print_db(pdb); errno = ENOSPC; return (uint32)-1; } + DEBUG(10,("print_job_start: Queue %s number of jobs (%d), max printjobs = %d\n", + printername, njobs, lp_maxprintjobs(snum) )); + if (!allocate_print_jobid(pdb, snum, printername, &jobid)) goto fail; |