};
typedef struct _print_queue_struct {
- int job; /* normally the UNIX jobid -- see note in
+ int sysjob; /* normally the UNIX jobid -- see note in
printing.c:traverse_fn_delete() */
int size;
int page_count;
return False;
}
- buf->job = atoi(tok[JOBTOK]);
+ buf->sysjob = atoi(tok[JOBTOK]);
buf->size = atoi(tok[TOTALTOK]);
buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED;
buf->time = time(NULL);
return False;
}
- buf->job = atoi(tokarr[LPRNG_JOBTOK]);
+ buf->sysjob = atoi(tokarr[LPRNG_JOBTOK]);
buf->size = atoi(tokarr[LPRNG_TOTALTOK]);
if (strequal(tokarr[LPRNG_RANKTOK],"active")) {
}
}
- buf->job = atoi(tok[1]);
+ buf->sysjob = atoi(tok[1]);
buf->status = strequal(tok[0],"HELD")?LPQ_PAUSED:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
}
}
- buf->job = atoi(tok[3]);
+ buf->sysjob = atoi(tok[3]);
buf->status = strequal(tok[2],"RUNNING")?LPQ_PRINTING:LPQ_QUEUED;
buf->priority = 0;
buf->time = time(NULL);
/* fill things from header line */
buf->time = jobtime;
- buf->job = jobid;
+ buf->sysjob = jobid;
buf->status = jobstat;
buf->priority = jobprio;
if (jobuser) {
tok[2] = p+1;
}
- buf->job = atoi(tok[1]);
+ buf->sysjob = atoi(tok[1]);
buf->size = atoi(tok[3]);
if (count > 7 && strequal(tok[7],"on")) {
buf->status = LPQ_PRINTING;
}
}
- buf->job = atoi(tok[2]);
+ buf->sysjob = atoi(tok[2]);
buf->size = atoi(tok[4]);
buf->status = strequal(tok[3],"active")?LPQ_PRINTING:LPQ_QUEUED;
buf->priority = 0;
}
}
- buf->job = atoi(tok[4]);
+ buf->sysjob = atoi(tok[4]);
buf->size = atoi(tok[7]);
if (strchr_m(tok[7],'K')) {
parse_line->space3 = '\0';
trim_char(parse_line->jobname, '\0', ' ');
- buf->job = atoi(parse_line->jobid);
+ buf->sysjob = atoi(parse_line->jobid);
buf->priority = 0;
buf->size = atoi(parse_line->size);
buf->time = time(NULL);
}
/* Get the jobid */
- buf->job = atoi(parse_line->jobid);
+ buf->sysjob = atoi(parse_line->jobid);
/* Get the job name */
parse_line->space2[0] = '\0';
while(next_token_talloc(frame, &cline, &tok, NULL)) {
switch (toknum) {
case 0:
- buf->job = atoi(tok);
+ buf->sysjob = atoi(tok);
break;
case 1:
buf->size = atoi(tok);
continue;
}
- temp->job = job_id;
+ temp->sysjob = job_id;
temp->size = job_k_octets * 1024;
temp->status = job_status == IPP_JOB_PENDING ? LPQ_QUEUED :
job_status == IPP_JOB_STOPPED ? LPQ_PAUSED :
continue;
}
- temp->job = job_id;
+ temp->sysjob = job_id;
temp->size = job_k_octets * 1024;
temp->status = job_status == IPP_JOB_PENDING ? LPQ_QUEUED :
job_status == IPP_JOB_STOPPED ? LPQ_PAUSED :
struct printjob pj, *old_pj;
if (jobid == (uint32)-1)
- jobid = q->job + UNIX_JOB_START;
+ jobid = q->sysjob + UNIX_JOB_START;
/* Preserve the timestamp on an existing unix print job */
pj.pid = (pid_t)-1;
pj.jobid = jobid;
- pj.sysjob = q->job;
+ pj.sysjob = q->sysjob;
pj.fd = -1;
pj.starttime = old_pj ? old_pj->starttime : q->time;
pj.status = q->status;
/* remove a unix job if it isn't in the system queue any more */
for (i=0;i<ts->qcount;i++) {
- uint32 u_jobid = (ts->queue[i].job + UNIX_JOB_START);
+ uint32 u_jobid = (ts->queue[i].sysjob + UNIX_JOB_START);
if (jobid == u_jobid)
break;
}
FIXME!!! This is the only place where queue->job
represents the SMB jobid --jerry */
- ts->queue[i].job = jobid;
+ ts->queue[i].sysjob = jobid;
ts->queue[i].size = pjob.size;
ts->queue[i].page_count = pjob.page_count;
ts->queue[i].status = pjob.status;
qcount++;
data.dsize += tdb_pack(NULL, 0, "ddddddff",
- (uint32)queue[i].job,
+ (uint32)queue[i].sysjob,
(uint32)queue[i].size,
(uint32)queue[i].page_count,
(uint32)queue[i].status,
continue;
len += tdb_pack(data.dptr + len, data.dsize - len, "ddddddff",
- (uint32)queue[i].job,
+ (uint32)queue[i].sysjob,
(uint32)queue[i].size,
(uint32)queue[i].page_count,
(uint32)queue[i].status,
continue;
}
- pjob->sysjob = queue[i].job;
+ pjob->sysjob = queue[i].sysjob;
/* don't reset the status on jobs to be deleted */
&qtime,
queue[i].fs_user,
queue[i].fs_file);
- queue[i].job = qjob;
+ queue[i].sysjob = qjob;
queue[i].size = qsize;
queue[i].page_count = qpage_count;
queue[i].status = qstatus;
continue;
}
- queue[total_count].job = jobid;
+ queue[total_count].sysjob = jobid;
queue[total_count].size = pjob->size;
queue[total_count].page_count = pjob->page_count;
queue[total_count].status = pjob->status;
bool found = false;
for (j = 0; j < total_count; j++) {
- if (queue[j].job == jobid) {
+ if (queue[j].sysjob == jobid) {
found = true;
break;
}
continue;
}
- queue[j].job = jobid;
+ queue[j].sysjob = jobid;
queue[j].size = pjob->size;
queue[j].page_count = pjob->page_count;
queue[j].status = pjob->status;
for (i=0;i<njobs;i++) {
bool owner = is_owner(server_info, lp_const_servicename(snum),
- queue[i].job);
+ queue[i].sysjob);
if (owner || can_job_admin) {
print_job_delete1(server_event_context(), msg_ctx,
- snum, queue[i].job);
+ snum, queue[i].sysjob);
}
}
struct spoolss_PrinterInfo2 *pinfo2,
TALLOC_CTX *mem_ctx)
{
- SETUP_SPOOLSS_NOTIFY_DATA_INTEGER(data, queue->job);
+ SETUP_SPOOLSS_NOTIFY_DATA_INTEGER(data, queue->sysjob);
}
/*******************************************************************
&queue[j], info,
pinfo2, snum,
&option_type,
- queue[j].job,
+ queue[j].sysjob,
mem_ctx);
}
t = gmtime(&queue->time);
- r->job_id = queue->job;
+ r->job_id = queue->sysjob;
r->printer_name = talloc_strdup(mem_ctx, lp_servicename(snum));
W_ERROR_HAVE_NO_MEMORY(r->printer_name);
t = gmtime(&queue->time);
- r->job_id = queue->job;
+ r->job_id = queue->sysjob;
r->printer_name = talloc_strdup(mem_ctx, lp_servicename(snum));
W_ERROR_HAVE_NO_MEMORY(r->printer_name);
int position, int snum,
struct spoolss_PrinterInfo2 *pinfo2)
{
- r->job_id = queue->job;
+ r->job_id = queue->sysjob;
r->next_job_id = 0;
if (next_queue) {
- r->next_job_id = next_queue->job;
+ r->next_job_id = next_queue->sysjob;
}
r->reserved = 0;
bool found = false;
for (i=0; i<count; i++) {
- if (queue[i].job == (int)jobid) {
+ if (queue[i].sysjob == (int)jobid) {
found = true;
break;
}
WERROR result;
for (i=0; i<count; i++) {
- if (queue[i].job == (int)jobid) {
+ if (queue[i].sysjob == (int)jobid) {
found = true;
break;
}