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;
};
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);
}
if(d->shutdown) return;
- mdnsd_dump (stderr, m, "incoming");
-
gettimeofday(&d->now,0);
if(m->header.qr == 0)
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);
// create a new unique record (try mdnsda_list first to make sure it's not used)
// conflict(arg) called at any point when one is detected and unable to recover
// after the first data is set_*(), any future changes effectively expire the old one and attempt to create a new unique record
-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);
//
// create a new shared record
mdnsdr mdnsd_shared(mdnsd d, char *host, int type, long int ttl);