summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2018-04-05 17:25:31 -0400
committerMichael R Sweet <michael.r.sweet@gmail.com>2018-04-05 17:25:31 -0400
commit15fe2ddc7f2662d8fffcec4d577618a85002f7db (patch)
tree3f8dd3d1f8a2ea3baef7f51cc7d1899aff3f1c72 /test
parentb056061b241f8a2660186794c01689dce5aaa15a (diff)
downloadcups-15fe2ddc7f2662d8fffcec4d577618a85002f7db.tar.gz
Fix ippfind _regtype
Diffstat (limited to 'test')
-rw-r--r--test/ippfind.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/ippfind.c b/test/ippfind.c
index c7e8765d0..79c0a0655 100644
--- a/test/ippfind.c
+++ b/test/ippfind.c
@@ -1194,7 +1194,12 @@ main(int argc, /* I - Number of command-line args */
*domain; /* Domain, if any */
strlcpy(buf, search, sizeof(buf));
- if ((regtype = strstr(buf, "._")) != NULL)
+
+ if (!strncmp(buf, "_http._", 7) || !strncmp(buf, "_https._", 8) || !strncmp(buf, "_ipp._", 6) || !strncmp(buf, "_ipps._", 7))
+ {
+ regtype = buf;
+ }
+ else if ((regtype = strstr(buf, "._")) != NULL)
{
if (strcmp(regtype, "._tcp"))
{
@@ -1249,6 +1254,9 @@ main(int argc, /* I - Number of command-line args */
service = get_service(services, name, regtype, domain);
+ if (getenv("IPPFIND_DEBUG"))
+ fprintf(stderr, "Resolving name=\"%s\", regtype=\"%s\", domain=\"%s\"\n", name, regtype, domain);
+
#ifdef HAVE_DNSSD
service->ref = dnssd_ref;
err = DNSServiceResolve(&(service->ref),
@@ -1274,6 +1282,9 @@ main(int argc, /* I - Number of command-line args */
* Browse for services of the given type...
*/
+ if (getenv("IPPFIND_DEBUG"))
+ fprintf(stderr, "Browsing for regtype=\"%s\", domain=\"%s\"\n", regtype, domain);
+
#ifdef HAVE_DNSSD
DNSServiceRef ref; /* Browse reference */