Changeset 751 for trunk/server/source3/printing/lpq_parse.c
- Timestamp:
- Nov 29, 2012, 1:59:04 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/printing/lpq_parse.c
r480 r751 165 165 } 166 166 167 buf-> job = atoi(tok[JOBTOK]);167 buf->sysjob = atoi(tok[JOBTOK]); 168 168 buf->size = atoi(tok[TOTALTOK]); 169 169 buf->status = strequal(tok[RANKTOK],"active")?LPQ_PRINTING:LPQ_QUEUED; … … 282 282 } 283 283 284 buf-> job= atoi(tokarr[LPRNG_JOBTOK]);284 buf->sysjob = atoi(tokarr[LPRNG_JOBTOK]); 285 285 buf->size = atoi(tokarr[LPRNG_TOTALTOK]); 286 286 … … 385 385 } 386 386 387 buf-> job = atoi(tok[1]);387 buf->sysjob = atoi(tok[1]); 388 388 buf->status = strequal(tok[0],"HELD")?LPQ_PAUSED:LPQ_QUEUED; 389 389 buf->priority = 0; … … 421 421 } 422 422 423 buf-> job = atoi(tok[3]);423 buf->sysjob = atoi(tok[3]); 424 424 buf->status = strequal(tok[2],"RUNNING")?LPQ_PRINTING:LPQ_QUEUED; 425 425 buf->priority = 0; … … 512 512 /* fill things from header line */ 513 513 buf->time = jobtime; 514 buf-> job = jobid;514 buf->sysjob = jobid; 515 515 buf->status = jobstat; 516 516 buf->priority = jobprio; … … 652 652 } 653 653 654 buf-> job = atoi(tok[1]);654 buf->sysjob = atoi(tok[1]); 655 655 buf->size = atoi(tok[3]); 656 656 if (count > 7 && strequal(tok[7],"on")) { … … 727 727 } 728 728 729 buf-> job = atoi(tok[2]);729 buf->sysjob = atoi(tok[2]); 730 730 buf->size = atoi(tok[4]); 731 731 buf->status = strequal(tok[3],"active")?LPQ_PRINTING:LPQ_QUEUED; … … 807 807 } 808 808 809 buf-> job = atoi(tok[4]);809 buf->sysjob = atoi(tok[4]); 810 810 811 811 buf->size = atoi(tok[7]); … … 897 897 trim_char(parse_line->jobname, '\0', ' '); 898 898 899 buf-> job = atoi(parse_line->jobid);899 buf->sysjob = atoi(parse_line->jobid); 900 900 buf->priority = 0; 901 901 buf->size = atoi(parse_line->size); … … 958 958 959 959 /* Get the jobid */ 960 buf-> job = atoi(parse_line->jobid);960 buf->sysjob = atoi(parse_line->jobid); 961 961 962 962 /* Get the job name */ … … 1024 1024 switch (toknum) { 1025 1025 case 0: 1026 buf-> job = atoi(tok);1026 buf->sysjob = atoi(tok); 1027 1027 break; 1028 1028 case 1: … … 1153 1153 } 1154 1154 1155 /****************************************************************************1156 Parse a file name from the system spooler to generate a jobid.1157 ****************************************************************************/1158 1159 uint32_t print_parse_jobid(const char *fname)1160 {1161 int jobid;1162 const char *p = strstr_m(fname,PRINT_SPOOL_PREFIX);1163 1164 if (!p) {1165 return (uint32_t)-1;1166 }1167 p += strlen(PRINT_SPOOL_PREFIX);1168 jobid = atoi(p);1169 if (jobid <= 0) {1170 return (uint32_t)-1;1171 }1172 return (uint32_t)jobid;1173 }
Note:
See TracChangeset
for help on using the changeset viewer.