projects
/
oweals
/
mdnsd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f04d8b9
)
fix entry duplication bug
author
John Crispin
<blogic@openwrt.org>
Wed, 25 Jun 2014 03:06:54 +0000
(
04:06
+0100)
committer
John Crispin
<blogic@openwrt.org>
Wed, 25 Jun 2014 03:06:54 +0000
(
04:06
+0100)
Signed-off-by: John Crispin <blogic@openwrt.org>
cache.c
patch
|
blob
|
history
diff --git
a/cache.c
b/cache.c
index 357caddd930bc056890edf68c9c895e06d909493..e775537fedc5318e5bd8ef12a32d37486187c931 100644
(file)
--- a/
cache.c
+++ b/
cache.c
@@
-126,14
+126,14
@@
cache_scan(void)
static struct cache_entry*
cache_entry(struct interface *iface, char *entry, int hlen, int ttl)
{
- struct cache_entry *s;
+ struct cache_entry *s
, *t
;
char *entry_buf;
char *host_buf;
char *type;
- s = avl_find_element(&entries, entry, s, avl);
-
if (s
)
- return s;
+ avl_for_each_element_safe(&entries, s, avl, t)
+
if (!strcmp(s->entry, entry)
)
+
return s;
s = calloc_a(sizeof(*s),
&entry_buf, strlen(entry) + 1,