]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Merge changes from CUPS 1.4svn-r7547.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 7 May 2008 22:24:51 +0000 (22:24 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 7 May 2008 22:24:51 +0000 (22:24 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@748 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-1.3.txt
backend/mdns.c
backend/network.c
cgi-bin/ipp-var.c
data/Makefile
driver/Makefile
scheduler/client.c
scheduler/cups-driverd.c
scheduler/dirsvc.c
scheduler/ipp.c

index d62d2d031fe7b5280776ae6cc6fc1d89f3ea8c94..a3f4184108a2cb562a9e9ba44c68aa7e43ed6bc5 100644 (file)
@@ -4,10 +4,18 @@ CHANGES-1.3.txt
 CHANGES IN CUPS V1.3.8
 
        - Documentation updates (STR #2785)
+       - The web interface "move jobs" operation redirected users to
+         the wrong URL (STR #2815)
+       - The Polish web interface translation contained errors
+         (STR #2815)
+       - The scheduler did not report PostScript printer PPDs with
+         filters as PostScript devices.
+       - The scheduler did not set the job document-format attribute
+         for jobs submitted using Create-Job and Send-Document.
        - cupsFileTell() did not work for log files opened in append
          mode (STR #2810)
        - The scheduler did not set QUERY_STRING all of the time
-         for CGI scripts (STR #2781)
+         for CGI scripts (STR #2781, STR #2816)
        - The scheduler now returns an error for bad job-sheets
          values (STR #2775)
        - Authenticated remote printing did not work over domain
index d6966a0851554c49618e632c1b87216b107d7589..4277f099e53719062fd2c0d7029708f78eb547b8 100644 (file)
@@ -269,6 +269,7 @@ main(int  argc,                             /* I - Number of command-line args */
           printf("network %s \"%s\" \"%s\"\n", device_uri,
                 device->make_and_model ? device->make_and_model : "Unknown",
                 device->name);
+          fflush(stdout);
 
          device->sent = 1;
         }
@@ -649,7 +650,8 @@ query_callback(
     else
       device->make_and_model = strdup(model);
 
-    if (device->type == CUPS_DEVICE_IPP &&
+    if ((device->type == CUPS_DEVICE_IPP ||
+         device->type == CUPS_DEVICE_PRINTER) &&
         (value = TXTRecordGetValuePtr(rdlen, rdata, "printer-type",
                                       &valueLen)) != NULL)
     {
@@ -658,6 +660,9 @@ query_callback(
       */
 
       device->cups_shared = 1;
+
+      if (device->type == CUPS_DEVICE_PRINTER)
+        device->sent = 1;
     }
   }
   else
index 141e764750d15bb6be87c6f93569035d05e66e40..d83ea9ccfab341edec7523b15191079cb7d72dbd 100644 (file)
  *
  * Contents:
  *
+ *   backendCheckSideChannel() - Check the side-channel for pending requests.
+ *   backendNetworkSideCB()    - Handle common network side-channel commands.
+ *   backendResolveURI()       - Get the device URI, resolving as needed.
+ *   resolve_callback()        - Build a device URI for the given service name.
  */
 
 /*
@@ -309,7 +313,7 @@ resolve_callback(
     */
 
     rp[0] = '/';
-    memcpy(rp, value, valueLen);
+    memcpy(rp + 1, value, valueLen);
     rp[valueLen + 1] = '\0';
   }
   else
index c1703e101afed0b8e4d7bb7ffbf9e34a48a63b40..79cfaf94799593add93bf4f8a632d7ead1899906 100644 (file)
@@ -474,10 +474,16 @@ cgiMoveJobs(http_t     *http,             /* I - Connection to server */
 
     if (cupsLastError() <= IPP_OK_CONFLICT)
     {
-      cgiRewriteURL(job_printer_uri, resource, sizeof(resource), NULL);
-      cgiFormEncode(uri, resource, sizeof(uri));
-      snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
-      cgiSetVariable("refresh_page", refresh);
+      const char *path = strstr(job_printer_uri, "/printers/");
+      if (!path)
+        path = strstr(job_printer_uri, "/classes/");
+
+      if (path)
+      {
+        cgiFormEncode(uri, path, sizeof(uri));
+        snprintf(refresh, sizeof(refresh), "2;URL=%s", uri);
+       cgiSetVariable("refresh_page", refresh);
+      }
     }
 
     if (job_id)
index a6047a9c60ff13f29e8f6fd84a3619c8a01905b0..810be4c90a116f17583264f0c474ab5d5f3aa515 100644 (file)
@@ -134,6 +134,7 @@ install-data:
        for file in $(DATAFILES); do \
                $(INSTALL_DATA) $$file $(DATADIR)/data; \
        done
+       $(INSTALL_DIR) -m 755 $(DATADIR)/model
        $(INSTALL_DIR) -m 755 $(DATADIR)/ppdc
        for file in $(PPDCFILES); do \
                $(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
@@ -184,6 +185,7 @@ uninstall:
        done
        -$(RMDIR) $(DATADIR)/profiles
        -$(RMDIR) $(DATADIR)/ppdc
+       -$(RMDIR) $(DATADIR)/model
        -$(RMDIR) $(DATADIR)/data
        -$(RMDIR) $(DATADIR)/charsets
        -$(RMDIR) $(DATADIR)/charmaps
index ea4240acbba96a03bf44843a73d25898882c1b4c..f94ec6fc126a1ffe8ebfb50003a0c0cc025a8be7 100644 (file)
@@ -278,7 +278,7 @@ testcmyk:           testcmyk.o libcupsdriver.a ../cups/libcups.a
        if test ! -d test; then \
                mkdir test; \
        fi
-       ./testcmyk > test/testcmyk.log 2>&1
+       ./testcmyk > test/testcmyk.log 2>&1 || echo "CMYK tests failed!"
 
 
 #
@@ -292,14 +292,14 @@ testdither:               testdither.o libcupsdriver.a ../cups/libcups.a
        if test ! -d test; then \
                mkdir test; \
        fi
-       ./testdither > test/0-255.pgm 2>test/0-255.log
-       ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log
-       ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log
-       ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log
-       ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log
-       ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log
-       ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log
-       ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log
+       ./testdither > test/0-255.pgm 2>test/0-255.log || echo "Dither 0-255 test failed!"
+       ./testdither 0 127 255 > test/0-127-255.pgm 2>test/0-127-255.log || echo "Dither 0-127-255 test failed!"
+       ./testdither 0 85 170 255 > test/0-85-170-255.pgm 2>test/0-85-170-255.log || echo "Dither 0-85-170-255 test failed!"
+       ./testdither 0 63 127 170 198 227 255 > test/0-63-127-170-198-227-255.pgm 2>test/0-63-127-170-198-227-255.log || echo "Dither 0-63-127-170-198-227-255 test failed!"
+       ./testdither 0 210 383 > test/0-210-383.pgm 2>test/0-210-383.log || echo "Dither 0-210-383 test failed!"
+       ./testdither 0 82 255 > test/0-82-255.pgm 2>test/0-82-255.log || echo "Dither 0-82-255 test failed!"
+       ./testdither 0 510 > test/0-510.pgm 2>test/0-510.log || echo "Dither 0-510 test failed!"
+       ./testdither 0 1020 > test/0-1020.pgm 2>test/0-1020.log || echo "Dither 0-1020 test failed!"
 
 
 #
@@ -313,7 +313,7 @@ testrgb:            testrgb.o libcupsdriver.a ../cups/libcups.a
        if test ! -d test; then \
                mkdir test; \
        fi
-       ./testrgb > test/testrgb.log 2>&1
+       ./testrgb > test/testrgb.log 2>&1 || echo "RGB tests failed!"
 
 
 #
index 107482773e5f6f14fe14aa71b1c6ab984896a78a..8a37842c789be38bd4fd57765e0ed2700f22f744 100644 (file)
@@ -3697,7 +3697,10 @@ is_cgi(cupsd_client_t *con,              /* I - Client connection */
   */
 
   if ((options = strchr(con->uri, '?')) != NULL)
-    cupsdSetStringf(&(con->query_string), "QUERY_STRING=%s", options + 1);
+  {
+    options ++;
+    cupsdSetStringf(&(con->query_string), "QUERY_STRING=%s", options);
+  }
 
  /*
   * Check for known types...
@@ -3720,7 +3723,8 @@ is_cgi(cupsd_client_t *con,               /* I - Client connection */
 
     filename = strrchr(filename, '/') + 1; /* Filename always absolute */
 
-    cupsdSetStringf(&con->options, " %s", options);
+    if (options)
+      cupsdSetStringf(&con->options, " %s", options);
 
     cupsdLogMessage(CUPSD_LOG_DEBUG2,
                     "is_cgi: Returning 1 with command=\"%s\" and options=\"%s\"",
index 9a199b01549db328065f0cd963352b1a173adc2d..3a8faa46cc41bf2eca7b6ba35bd5dacd6ecfca8d 100644 (file)
@@ -1271,15 +1271,12 @@ load_ppds(const char *d,                /* I - Actual directory */
        if (!strncasecmp(ptr, "true", 4))
           type = PPD_TYPE_FAX;
       }
-      else if (!strncmp(line, "*cupsFilter:", 12) &&
-               (type == PPD_TYPE_POSTSCRIPT || type == PPD_TYPE_UNKNOWN))
+      else if (!strncmp(line, "*cupsFilter:", 12) && type == PPD_TYPE_POSTSCRIPT)
       {
         if (strstr(line + 12, "application/vnd.cups-raster"))
          type = PPD_TYPE_RASTER;
         else if (strstr(line + 12, "application/vnd.cups-pdf"))
          type = PPD_TYPE_PDF;
-       else
-         type = PPD_TYPE_UNKNOWN;
       }
       else if (!strncmp(line, "*cupsModelNumber:", 17))
         sscanf(line, "*cupsModelNumber:%d", &model_number);
index 8af4571e83b60cf389851b2657af6a15eeec9832..ea54dbfba632ad3b295ec5ed551f35d9638d23dc 100644 (file)
  *
  * Contents:
  *
+ *   cupsdDeregisterPrinter()   - Stop sending broadcast information for a local
+ *                                printer and remove any pending references to
+ *                                remote printers.
+ *   cupsdLoadRemoteCache()     - Load the remote printer cache.
+ *   cupsdRegisterPrinter()     - Start sending broadcast information for a
+ *                                printer or update the broadcast contents.
+ *   cupsdRestartPolling()      - Restart polling servers as needed.
+ *   cupsdSaveRemoteCache()     - Save the remote printer cache.
+ *   cupsdSendBrowseList()      - Send new browsing information as necessary.
+ *   cupsdStartBrowsing()       - Start sending and receiving broadcast
+ *                                information.
+ *   cupsdStartPolling()        - Start polling servers as needed.
+ *   cupsdStopBrowsing()        - Stop sending and receiving broadcast
+ *                                information.
+ *   cupsdStopPolling()         - Stop polling servers as needed.
+ *   cupsdUpdateDNSSDBrowse()   - Handle DNS-SD queries.
+ *   cupsdUpdateDNSSDName()     - Update the computer name we use for
+ *                                browsing...
+ *   cupsdUpdateLDAPBrowse()    - Scan for new printers via LDAP...
+ *   cupsdUpdateSLPBrowse()     - Get browsing information via SLP.
+ *   dequote()                  - Remote quotes from a string.
+ *   dnssdBuildTxtRecord()      - Build a TXT record from printer info.
+ *   dnssdComparePrinters()     - Compare the registered names of two printers.
+ *   dnssdDeregisterPrinter()   - Stop sending broadcast information for a
+ *                                printer.
+ *   dnssdPackTxtRecord()       - Pack an array of key/value pairs into the TXT
+ *                                record format.
+ *   dnssdRegisterCallback()    - DNSServiceRegister callback.
+ *   dnssdRegisterPrinter()     - Start sending broadcast information for a
+ *                                printer or update the broadcast contents.
+ *   get_hostconfig()           - Get an /etc/hostconfig service setting.
+ *   is_local_queue()           - Determine whether the URI points at a local
+ *                                queue.
+ *   process_browse_data()      - Process new browse data.
+ *   process_implicit_classes() - Create/update implicit classes as needed.
+ *   send_cups_browse()         - Send new browsing information using the CUPS
+ *                                protocol.
+ *   send_ldap_browse()         - Send LDAP printer registrations.
+ *   send_slp_browse()          - Register the specified printer with SLP.
+ *   slp_attr_callback()        - SLP attribute callback
+ *   slp_dereg_printer()        - SLPDereg() the specified printer
+ *   slp_get_attr()             - Get an attribute from an SLP registration.
+ *   slp_reg_callback()         - Empty SLPRegReport.
+ *   slp_url_callback()         - SLP service url callback
+ *   update_cups_browse()       - Update the browse lists using the CUPS
+ *                                protocol.
+ *   update_lpd()               - Update the LPD configuration as needed.
+ *   update_polling()           - Read status messages from the poll daemons.
+ *   update_smb()               - Update the SMB configuration as needed.
  */
 
 /*
index dc08f621b613cc399e9e2dec14d9874946497bbd..f660dc29bdd6474277f56f8df8c02bd10c18d867 100644 (file)
@@ -8309,7 +8309,7 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
     ipp_attribute_t    *doc_name;      /* document-name attribute */
 
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "print_job: auto-typing file...");
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job ???] Auto-typing file...");
 
     doc_name = ippFindAttribute(con->request, "document-name", IPP_TAG_NAME);
     filetype = mimeFileType(MimeDatabase, con->filename,
@@ -8318,6 +8318,9 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
 
     if (!filetype)
       filetype = mimeType(MimeDatabase, super, type);
+
+    cupsdLogMessage(CUPSD_LOG_INFO, "[Job ???] Request file type is %s/%s.",
+                   filetype->super, filetype->type);
   }
   else
     filetype = mimeType(MimeDatabase, super, type);
@@ -8373,9 +8376,6 @@ print_job(cupsd_client_t  *con,           /* I - Client connection */
   if ((job = add_job(con, printer, filetype)) == NULL)
     return;
 
-  cupsdLogMessage(CUPSD_LOG_INFO, "[Job %d] Adding job file of type %s/%s.",
-                  job->id, filetype->super, filetype->type);
-
  /*
   * Update quota data...
   */
@@ -8414,9 +8414,10 @@ print_job(cupsd_client_t  *con,          /* I - Client connection */
   * Log and save the job...
   */
 
-  cupsdLogMessage(CUPSD_LOG_INFO, "[Job %d] Queued on \"%s\" by \"%s\".",
-                  job->id, job->dest, job->username);
-  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] hold_until = %d", job->id,
+  cupsdLogMessage(CUPSD_LOG_INFO,
+                  "[Job %d] File of type %s/%s queued by \"%s\".", job->id,
+                 filetype->super, filetype->type, job->username);
+  cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] hold_until=%d", job->id,
                   (int)job->hold_until);
 
  /*
@@ -9305,7 +9306,8 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
              ipp_attribute_t *uri)     /* I - Printer URI */
 {
   ipp_attribute_t      *attr;          /* Current attribute */
-  ipp_attribute_t      *format;        /* Document-format attribute */
+  ipp_attribute_t      *format;        /* Request's document-format attribute */
+  ipp_attribute_t      *jformat;       /* Job's document-format attribute */
   const char           *default_format;/* document-format-default value */
   int                  jobid;          /* Job ID number */
   cupsd_job_t          *job;           /* Current job */
@@ -9501,7 +9503,7 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
     ipp_attribute_t    *doc_name;      /* document-name attribute */
 
 
-    cupsdLogMessage(CUPSD_LOG_DEBUG, "send_document: auto-typing file...");
+    cupsdLogMessage(CUPSD_LOG_DEBUG, "[Job %d] Auto-typing file...", job->id);
 
     doc_name = ippFindAttribute(con->request, "document-name", IPP_TAG_NAME);
     filetype = mimeFileType(MimeDatabase, con->filename,
@@ -9510,12 +9512,18 @@ send_document(cupsd_client_t  *con,     /* I - Client connection */
 
     if (!filetype)
       filetype = mimeType(MimeDatabase, super, type);
+
+    cupsdLogMessage(CUPSD_LOG_DEBUG,
+                   "[Job %d] Request file type is %s/%s.", job->id,
+                   filetype->super, filetype->type);
   }
   else
     filetype = mimeType(MimeDatabase, super, type);
 
+  jformat = ippFindAttribute(job->attrs, "document-format", IPP_TAG_MIMETYPE);
+
   if (filetype &&
-      (!format ||
+      (!jformat ||
        (!strcmp(super, "application") && !strcmp(type, "octet-stream"))))
   {
    /*
@@ -9526,14 +9534,14 @@ send_document(cupsd_client_t  *con,     /* I - Client connection */
     snprintf(mimetype, sizeof(mimetype), "%s/%s", filetype->super,
              filetype->type);
 
-    if (format)
+    if (jformat)
     {
-      _cupsStrFree(format->values[0].string.text);
+      _cupsStrFree(jformat->values[0].string.text);
 
-      format->values[0].string.text = _cupsStrAlloc(mimetype);
+      jformat->values[0].string.text = _cupsStrAlloc(mimetype);
     }
     else
-      ippAddString(con->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
+      ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
                   "document-format", NULL, mimetype);
   }
   else if (!filetype)
@@ -9564,10 +9572,6 @@ send_document(cupsd_client_t  *con,      /* I - Client connection */
     return;
   }
 
-  cupsdLogMessage(CUPSD_LOG_DEBUG,
-                  "send_document: request file type is %s/%s.",
-                 filetype->super, filetype->type);
-
  /*
   * Add the file to the job...
   */
@@ -9595,8 +9599,8 @@ send_document(cupsd_client_t  *con,       /* I - Client connection */
   cupsdClearString(&con->filename);
 
   cupsdLogMessage(CUPSD_LOG_INFO,
-                  "File of type %s/%s queued in job #%d by \"%s\".",
-                  filetype->super, filetype->type, job->id, job->username);
+                  "[Job %d] File of type %s/%s queued by \"%s\".", job->id,
+                  filetype->super, filetype->type, job->username);
 
  /*
   * Start the job if this is the last document...