]> git.karo-electronics.de Git - mdnsd.git/blobdiff - mdnsd.c
add record as an argument to the conflict function
[mdnsd.git] / mdnsd.c
diff --git a/mdnsd.c b/mdnsd.c
index edb8e7337b835952a27bebd749728abde5d5427a..6f134e0e6d0aff163d7c3f517320c8bdf13976b5 100644 (file)
--- a/mdnsd.c
+++ b/mdnsd.c
@@ -51,7 +51,7 @@ struct mdnsdr_struct
     struct mdnsda_struct rr;
     char unique; // # of checks performed to ensure
     int tries;
-    void (*conflict)(char *, int, void *);
+    void (*conflict)(mdnsdr r, char *, int, void *);
     void *arg;
     struct mdnsdr_struct *next, *list;
 };
@@ -256,7 +256,7 @@ void _q_answer(mdnsd d, struct cached *c)
 
 void _conflict(mdnsd d, mdnsdr r)
 {
-    r->conflict(r->rr.name,r->rr.type,r->arg);
+    r->conflict(r, r->rr.name,r->rr.type,r->arg);
     mdnsd_done(d,r);
 }
 
@@ -508,8 +508,6 @@ void mdnsd_in(mdnsd d, struct message *m, unsigned long int ip, unsigned short i
 
     if(d->shutdown) return;
 
-    mdnsd_dump (stderr, m, "incoming");
-
     gettimeofday(&d->now,0);
 
     if(m->header.qr == 0)
@@ -822,7 +820,7 @@ mdnsdr mdnsd_shared(mdnsd d, char *host, int type, long int ttl)
     return r;
 }
 
-mdnsdr mdnsd_unique(mdnsd d, char *host, int type, long int ttl, void (*conflict)(char *host, int type, void *arg), void *arg)
+mdnsdr mdnsd_unique(mdnsd d, char *host, int type, long int ttl, void (*conflict)(mdnsdr r, char *host, int type, void *arg), void *arg)
 {
     mdnsdr r;
     r = mdnsd_shared(d,host,type,ttl);