summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES-1.3.txt10
-rw-r--r--backend/mdns.c7
-rw-r--r--backend/network.c6
-rw-r--r--cgi-bin/ipp-var.c14
-rw-r--r--data/Makefile2
-rw-r--r--driver/Makefile20
-rw-r--r--scheduler/client.c8
-rw-r--r--scheduler/cups-driverd.c5
-rw-r--r--scheduler/dirsvc.c49
-rw-r--r--scheduler/ipp.c44
10 files changed, 122 insertions, 43 deletions
diff --git a/CHANGES-1.3.txt b/CHANGES-1.3.txt
index d62d2d031..a3f418410 100644
--- a/CHANGES-1.3.txt
+++ b/CHANGES-1.3.txt
@@ -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
diff --git a/backend/mdns.c b/backend/mdns.c
index d6966a085..4277f099e 100644
--- a/backend/mdns.c
+++ b/backend/mdns.c
@@ -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
diff --git a/backend/network.c b/backend/network.c
index 141e76475..d83ea9ccf 100644
--- a/backend/network.c
+++ b/backend/network.c
@@ -16,6 +16,10 @@
*
* 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
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c
index c1703e101..79cfaf947 100644
--- a/cgi-bin/ipp-var.c
+++ b/cgi-bin/ipp-var.c
@@ -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)
diff --git a/data/Makefile b/data/Makefile
index a6047a9c6..810be4c90 100644
--- a/data/Makefile
+++ b/data/Makefile
@@ -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
diff --git a/driver/Makefile b/driver/Makefile
index ea4240acb..f94ec6fc1 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -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!"
#
diff --git a/scheduler/client.c b/scheduler/client.c
index 107482773..8a37842c7 100644
--- a/scheduler/client.c
+++ b/scheduler/client.c
@@ -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\"",
diff --git a/scheduler/cups-driverd.c b/scheduler/cups-driverd.c
index 9a199b015..3a8faa46c 100644
--- a/scheduler/cups-driverd.c
+++ b/scheduler/cups-driverd.c
@@ -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);
diff --git a/scheduler/dirsvc.c b/scheduler/dirsvc.c
index 8af4571e8..ea54dbfba 100644
--- a/scheduler/dirsvc.c
+++ b/scheduler/dirsvc.c
@@ -14,6 +14,55 @@
*
* 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.
*/
/*
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index dc08f621b..f660dc29b 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -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...