Licensing: Update version in file header comments
[adns] / src / check.c
index 21dca70..d86268e 100644 (file)
@@ -11,7 +11,7 @@
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2, or (at your option)
+ *  the Free Software Foundation; either version 3, or (at your option)
  *  any later version.
  *  
  *  This program is distributed in the hope that it will be useful,
@@ -78,11 +78,13 @@ static void checkc_global(adns_state ads) {
   const struct sortlist *sl;
   int i;
   
-  assert(ads->udpsocket >= 0);
+  assert(ads->udpsockets >= 0);
 
   for (i=0; i<ads->nsortlist; i++) {
     sl= &ads->sortlist[i];
-    assert(adns__addr_match_p(sl->af,&sl->base, sl->af,&sl->base,&sl->mask));
+    assert(adns__addr_matches(sl->base.sa.sa_family,
+                             adns__sockaddr_addr(&sl->base.sa),
+                             &sl->base,&sl->mask));
   }
 
   assert(ads->tcpserver >= 0 && ads->tcpserver < ads->nservers);