udns 0.3 has a bug in new list code

Michael Tokarev mjt+udns at tls.msk.ru
Thu Jan 23 13:27:09 MSK 2014


This is just a heads-up.  The following patch fixes it:

commit 9da71a0720ae43a6b28155ba17770722785e9fee
Author: Michael Tokarev <mjt at tls.msk.ru>
Date:   Thu Jan 23 12:59:08 2014 +0400

    fix a bug in list impl

diff --git a/udns_resolver.c b/udns_resolver.c
index 00ba99d..b8f899a 100644
--- a/udns_resolver.c
+++ b/udns_resolver.c
@@ -106,9 +106,9 @@ static __inline void qlist_remove(struct dns_qlist *list, st
 static __inline void
 qlist_add_head(struct dns_qlist *list, struct dns_query *q) {
   q->dnsq_next = list->head;
-  list->head = q;
   if (list->head) list->head->dnsq_prev = q;
   else list->tail = q;
+  list->head = q;
   q->dnsq_prev = NULL;
 }


I'll release a new version hopefully today.


More information about the udns mailing list