Don't cache hosts as services
[project/mdnsd.git] / dns.c
diff --git a/dns.c b/dns.c
index 4c3dbf9..7c49236 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -99,7 +99,7 @@ dns_send_question(struct interface *iface, const char *question, int type, int m
 
        DBG(1, "Q <- %s %s\n", dns_type_string(type), question);
        if (interface_send_packet(iface, NULL, iov, ARRAY_SIZE(iov)) < 0)
-               perror("failed to send question :");
+               perror("failed to send question");
 }
 
 
@@ -178,7 +178,7 @@ dns_send_answer(struct interface *iface, struct sockaddr *to, const char *answer
        }
 
        if (interface_send_packet(iface, to, iov, n_iov) < 0)
-               fprintf(stderr, "failed to send question\n");
+               perror("failed to send answer");
 }
 
 void
@@ -374,6 +374,7 @@ parse_question(struct interface *iface, struct sockaddr *from, char *name, struc
 
        case TYPE_PTR:
                if (!strcmp(name, sdudp)) {
+                       dns_reply_a(iface, to, announce_ttl);
                        service_announce_services(iface, to, announce_ttl);
                } else {
                        /* First dot separates instance name from the rest */