diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-04-12 20:53:56 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-04-12 20:53:56 +0000 |
commit | b7e1f69e270e38642305d9064e9ca8051419b52c (patch) | |
tree | e526f5ad630d7dc1b3e7f372fafdd0ee8de8f427 /avahi-core | |
parent | 67fbf0449d3558209e5758811de4506f689badb8 (diff) |
allow adding of generic DNS RRs properly. Patch from Sjoerd Simons again (closes #130)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1407 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r-- | avahi-core/dns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/avahi-core/dns.c b/avahi-core/dns.c index 614c396..0206ec7 100644 --- a/avahi-core/dns.c +++ b/avahi-core/dns.c @@ -589,6 +589,7 @@ static int parse_rdata(AvahiDnsPacket *p, AvahiRecord *r, uint16_t rdlength) { if (rdlength > 0) { r->data.generic.data = avahi_memdup(avahi_dns_packet_get_rptr(p), rdlength); + r->data.generic.size = rdlength; if (avahi_dns_packet_skip(p, rdlength) < 0) return -1; @@ -754,7 +755,7 @@ static int append_rdata(AvahiDnsPacket *p, AvahiRecord *r) { default: if (r->data.generic.size) - if (avahi_dns_packet_append_bytes(p, r->data.generic.data, r->data.generic.size)) + if (!avahi_dns_packet_append_bytes(p, r->data.generic.data, r->data.generic.size)) return -1; break; |