|
|
8b7ff19 |
diff --git a/cups/ipp-vars.c b/cups/ipp-vars.c
|
|
|
68523cb |
index 395b0eb..d863287 100644
|
|
|
8b7ff19 |
--- a/cups/ipp-vars.c
|
|
|
8b7ff19 |
+++ b/cups/ipp-vars.c
|
|
|
68523cb |
@@ -12,7 +12,7 @@
|
|
|
68523cb |
* Include necessary headers...
|
|
|
8b7ff19 |
*/
|
|
|
8b7ff19 |
|
|
|
68523cb |
-#include <cups/cups.h>
|
|
|
68523cb |
+#include "cups/cups-private.h"
|
|
|
8b7ff19 |
#include "ipp-private.h"
|
|
|
8b7ff19 |
#include "string-private.h"
|
|
|
8b7ff19 |
#include "debug-internal.h"
|
|
|
68523cb |
@@ -220,10 +220,22 @@ _ippVarsSet(_ipp_vars_t *v, /* I - IPP variables */
|
|
|
68523cb |
{
|
|
|
8b7ff19 |
if (!strcmp(name, "uri"))
|
|
|
8b7ff19 |
{
|
|
|
68523cb |
- char uri[1024]; /* New printer URI */
|
|
|
68523cb |
- http_uri_status_t uri_status; /* URI status */
|
|
|
68523cb |
+ char uri[1024]; /* New printer URI */
|
|
|
68523cb |
+ char resolved[1024]; /* Resolved mDNS URI */
|
|
|
8b7ff19 |
|
|
|
8b7ff19 |
- if ((uri_status = httpSeparateURI(HTTP_URI_CODING_ALL, value, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource))) < HTTP_URI_STATUS_OK)
|
|
|
68523cb |
+ if (strstr(value, "._tcp"))
|
|
|
8b7ff19 |
+ {
|
|
|
8b7ff19 |
+ /*
|
|
|
8b7ff19 |
+ * Resolve URI...
|
|
|
8b7ff19 |
+ */
|
|
|
8b7ff19 |
+
|
|
|
68523cb |
+ if (!_httpResolveURI(value, resolved, sizeof(resolved), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
|
|
|
8b7ff19 |
+ return (0);
|
|
|
8b7ff19 |
+
|
|
|
68523cb |
+ value = resolved;
|
|
|
8b7ff19 |
+ }
|
|
|
8b7ff19 |
+
|
|
|
68523cb |
+ if (httpSeparateURI(HTTP_URI_CODING_ALL, value, v->scheme, sizeof(v->scheme), v->username, sizeof(v->username), v->host, sizeof(v->host), &(v->port), v->resource, sizeof(v->resource)) < HTTP_URI_STATUS_OK)
|
|
|
8b7ff19 |
return (0);
|
|
|
8b7ff19 |
|
|
|
8b7ff19 |
if (v->username[0])
|