diff options
author | Tim Potter <tpot@samba.org> | 2002-02-25 23:18:05 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-02-25 23:18:05 +0000 |
commit | 2f8452fd49dd34da5cd07629dcba937861dd0731 (patch) | |
tree | 0c3b8dfd454819e4215dd1694cdb407c89bdcbbe /source3/printing | |
parent | f4ab3072a6d11ce8ee6062fb4e5a1f7b4e10a0e0 (diff) | |
download | samba-2f8452fd49dd34da5cd07629dcba937861dd0731.tar.gz samba-2f8452fd49dd34da5cd07629dcba937861dd0731.tar.bz2 samba-2f8452fd49dd34da5cd07629dcba937861dd0731.zip |
Merge of printing performance fixes from appliance.
(This used to be commit c8dc59dfe877f63bea6976b7d7fd448e0c8722ba)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/printing.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 10466cd5f2..f783f8d590 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -163,7 +163,7 @@ static void print_unix_job(int snum, print_queue_struct *q) fstrcpy(pj.filename, ""); fstrcpy(pj.jobname, q->file); fstrcpy(pj.user, q->user); - fstrcpy(pj.qname, lp_servicename(snum)); + pj.snum = snum; print_job_store(jobid, &pj); } @@ -185,7 +185,7 @@ static int traverse_fn_delete(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void memcpy(&jobid, key.dptr, sizeof(jobid)); memcpy(&pjob, data.dptr, sizeof(pjob)); - if (strcmp(lp_servicename(ts->snum), pjob.qname)) { + if (ts->snum != pjob.snum) { /* this isn't for the queue we are looking at */ ts->total_jobs++; return 0; @@ -552,7 +552,7 @@ int print_job_snum(int jobid) struct printjob *pjob = print_job_find(jobid); if (!pjob) return -1; - return lp_servicenumber(pjob->qname); + return pjob->snum; } /**************************************************************************** @@ -959,7 +959,7 @@ int print_job_start(struct current_user *user, int snum, char *jobname) fstrcpy(pjob.user, uidtoname(user->uid)); } - fstrcpy(pjob.qname, lp_servicename(snum)); + pjob.snum = snum; /* lock the database */ tdb_lock_bystring(tdb, "INFO/nextjob"); @@ -1113,7 +1113,7 @@ static int traverse_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, void * memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != print_queue_snum(pjob.qname)) return 0; + if (ts->snum != pjob.snum) return 0; if (ts->qcount >= ts->maxcount) return 0; @@ -1148,7 +1148,7 @@ static int traverse_count_fn_queue(TDB_CONTEXT *t, TDB_DATA key, TDB_DATA data, memcpy(&pjob, data.dptr, sizeof(pjob)); /* maybe it isn't for this queue */ - if (ts->snum != print_queue_snum(pjob.qname)) return 0; + if (ts->snum != pjob.snum) return 0; ts->count++; |