Ignore:
Timestamp:
Aug 2, 2010, 8:16:45 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: trunk update to 3.5.4

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/printing/lpq_parse.c

    r414 r480  
    1919
    2020#include "includes.h"
     21#include "printing.h"
    2122
    2223static const char *Months[13] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
     
    11511152        return ret;
    11521153}
     1154
     1155/****************************************************************************
     1156 Parse a file name from the system spooler to generate a jobid.
     1157****************************************************************************/
     1158
     1159uint32_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.