Simplify UDP vs. TCP handling in service_announce_services
[project/mdnsd.git] / dns.c
diff --git a/dns.c b/dns.c
index de0c21a..550befc 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -367,7 +367,10 @@ parse_question(struct interface *iface, char *name, struct dns_question *q)
                break;
 
        case TYPE_PTR:
                break;
 
        case TYPE_PTR:
-               service_announce_services(iface, name, announce_ttl);
+               if (!strcmp(name, sdudp))
+                       service_announce_services(iface, 0, announce_ttl);
+               else if (!strcmp(name, sdtcp))
+                       service_announce_services(iface, 1, announce_ttl);
                service_reply(iface, name, announce_ttl);
                break;
 
                service_reply(iface, name, announce_ttl);
                break;