s3-printing: remove print_parse_jobid() from print_cups.c
[ddiss/samba.git] / source3 / printing / print_cups.c
index 95ddd570bb797bd3e387e824c3c9a479971d784c..fd052df17f1d57a979cf7fc1ae0b3971e2bc8368 100644 (file)
@@ -411,7 +411,7 @@ static bool cups_pcap_load_async(struct tevent_context *ev,
                return false;
        }
 
-       pid = sys_fork();
+       pid = fork();
        if (pid == (pid_t)-1) {
                DEBUG(10,("cups_pcap_load_async: fork failed %s\n",
                        strerror(errno) ));
@@ -871,7 +871,6 @@ static int cups_job_submit(int snum, struct printjob *pjob)
        char *cupsoptions = NULL;
        char *filename = NULL;
        size_t size;
-       uint32_t jobid = (uint32_t)-1;
 
        DEBUG(5,("cups_job_submit(%d, %p)\n", snum, pjob));
 
@@ -933,21 +932,12 @@ static int cups_job_submit(int snum, struct printjob *pjob)
                     "job-originating-host-name", NULL,
                     pjob->clientmachine);
 
-       /* Get the jobid from the filename. */
-       jobid = print_parse_jobid(pjob->filename);
-       if (jobid == (uint32_t)-1) {
-               DEBUG(0,("cups_job_submit: failed to parse jobid from name %s\n",
-                               pjob->filename ));
-               jobid = 0;
-       }
-
        if (!push_utf8_talloc(frame, &jobname, pjob->jobname, &size)) {
                goto out;
        }
        new_jobname = talloc_asprintf(frame,
                        "%s%.8u %s", PRINT_SPOOL_PREFIX,
-                       (unsigned int)jobid,
-                       jobname);
+                       pjob->jobid, jobname);
        if (new_jobname == NULL) {
                goto out;
        }