Bugfix: rr_entry_find() only matched the entry type but not its name.

This commit is contained in:
Darell Tan 2012-10-13 01:00:28 +08:00
parent 0fcbc3fe4b
commit 4e19b7120e

2
mdns.c
View File

@ -457,7 +457,7 @@ struct rr_group *rr_group_find(struct rr_group* g, uint8_t *name) {
struct rr_entry *rr_entry_find(struct rr_list *rr_list, uint8_t *name, uint16_t type) {
struct rr_list *rr = rr_list;
for (; rr; rr = rr->next) {
if (rr->e->type == type)
if (rr->e->type == type && cmp_nlabel(rr->e->name, name) == 0)
return rr->e;
}
return NULL;