Store a job structure back to the database.
****************************************************************************/
-static BOOL pjob_store(int snum, uint32 jobid, struct printjob *pjob, BOOL donotify)
+static BOOL pjob_store(int snum, uint32 jobid, struct printjob *pjob)
{
TDB_DATA old_data, new_data;
BOOL ret;
/* Send notify updates for what has changed */
- if (donotify && ret && (old_data.dsize == 0 || old_data.dsize == sizeof(*pjob))) {
+ if (ret && (old_data.dsize == 0 || old_data.dsize == sizeof(*pjob))) {
pjob_store_notify(
snum, jobid, (struct printjob *)old_data.dptr,
(struct printjob *)new_data.dptr);
fstrcpy(pj.user, q->fs_user);
fstrcpy(pj.queuename, lp_const_servicename(snum));
- pjob_store(snum, jobid, &pj, True);
+ pjob_store(snum, jobid, &pj);
}
pjob->sysjob = queue[i].job;
pjob->status = queue[i].status;
- pjob_store(snum, jobid, pjob, True);
+ pjob_store(snum, jobid, pjob);
}
/* now delete any queued entries that don't appear in the
return False;
fstrcpy(pjob->jobname, name);
- return pjob_store(snum, jobid, pjob, True);
+ return pjob_store(snum, jobid, pjob);
}
/****************************************************************************
/* Set the tdb entry to be deleting. */
pjob->status = LPQ_DELETING;
- pjob_store(snum, jobid, pjob, True);
+ pjob_store(snum, jobid, pjob);
if (pjob->spooled && pjob->sysjob != -1)
result = (*(current_printif->job_delete))(snum, pjob);
return_code = write(pjob->fd, buf, size);
if (return_code>0) {
pjob->size += size;
- pjob_store(snum, jobid, pjob, True);
+ pjob_store(snum, jobid, pjob);
}
return return_code;
}
if (!print_job_exists(snum, jobid))
break;
}
- if (jobid == next_jobid || !pjob_store(snum, jobid, &pjob, False)) {
+ if (jobid == next_jobid || !pjob_store(snum, jobid, &pjob)) {
DEBUG(3, ("print_job_start: either jobid (%d)==next_jobid(%d) or pjob_store failed.\n",
jobid, next_jobid ));
jobid = -1;
goto fail;
}
- pjob_store(snum, jobid, &pjob, True);
+ pjob_store(snum, jobid, &pjob);
release_print_db(pdb);
return;
pjob->page_count++;
- pjob_store(snum, jobid, pjob, True);
+ pjob_store(snum, jobid, pjob);
}
/****************************************************************************
pjob->spooled = True;
pjob->status = LPQ_QUEUED;
- pjob_store(snum, jobid, pjob, True);
+ pjob_store(snum, jobid, pjob);
/* make sure the database is up to date */
if (print_cache_expired(snum))