-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
Users sometimes pass URIs from dnssd and driverless backends as a device URI for IPP Everywhere queues. These URIs have mDNS hostnames in it, so they need to be resolved before used in connection.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
*/ | ||
|
||
#include "cupsd.h" | ||
#include <cups/http-private.h> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
#include <cups/ppd-private.h> | ||
|
||
#ifdef __APPLE__ | ||
|
@@ -5271,6 +5272,7 @@ create_local_bg_thread( | |
userpass[256], /* User:pass */ | ||
host[256], /* Hostname */ | ||
resource[1024], /* Resource path */ | ||
uri[1024], /* Resolved URI, unused */ | ||
line[1024]; /* Line from PPD */ | ||
int port; /* Port number */ | ||
http_encryption_t encryption; /* Type of encryption to use */ | ||
|
@@ -5292,7 +5294,7 @@ create_local_bg_thread( | |
|
||
cupsdLogMessage(CUPSD_LOG_DEBUG, "%s: Generating PPD file from \"%s\"...", printer->name, printer->device_uri); | ||
|
||
if (httpSeparateURI(HTTP_URI_CODING_ALL, printer->device_uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK) | ||
if (httpSeparateURI(HTTP_URI_CODING_ALL, _httpResolveURI(printer->device_uri, uri, sizeof(uri), _HTTP_RESOLVE_DEFAULT, NULL, NULL), scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK) | ||
This comment has been minimized.
Sorry, something went wrong.
michaelrsweet
Member
|
||
{ | ||
cupsdLogMessage(CUPSD_LOG_ERROR, "%s: Bad device URI \"%s\".", printer->name, printer->device_uri); | ||
return (NULL); | ||
|
I believe that cups-private.h already includes this header so it shouldn't be necessary...