start = avahi_dns_packet_get_rptr(p);
- r = avahi_record_new_full(name, class, type);
+ r = avahi_record_new_full(name, class, type, ttl);
switch (type) {
case AVAHI_DNS_TYPE_PTR:
/* Check if we read enough data */
if ((guint8*) avahi_dns_packet_get_rptr(p) - (guint8*) start != rdlength)
goto fail;
-
- r->ttl = ttl;
return r;
if (!(t = avahi_dns_packet_append_name(p, k->name)) ||
!avahi_dns_packet_append_uint16(p, k->type) ||
- !avahi_dns_packet_append_uint16(p, k->class | (unicast_response ? AVAHI_DNS_UNICAST_RESPONSE : 0))) {
+ !avahi_dns_packet_append_uint16(p, k->clazz | (unicast_response ? AVAHI_DNS_UNICAST_RESPONSE : 0))) {
p->size = size;
return NULL;
}
if (!(t = avahi_dns_packet_append_name(p, r->key->name)) ||
!avahi_dns_packet_append_uint16(p, r->key->type) ||
- !avahi_dns_packet_append_uint16(p, cache_flush ? (r->key->class | AVAHI_DNS_CACHE_FLUSH) : (r->key->class &~ AVAHI_DNS_CACHE_FLUSH)) ||
+ !avahi_dns_packet_append_uint16(p, cache_flush ? (r->key->clazz | AVAHI_DNS_CACHE_FLUSH) : (r->key->clazz &~ AVAHI_DNS_CACHE_FLUSH)) ||
!avahi_dns_packet_append_uint32(p, (max_ttl && r->ttl > max_ttl) ? max_ttl : r->ttl) ||
!(l = avahi_dns_packet_append_uint16(p, 0)))
goto fail;