Licensing: Update version in file header comments
[adns] / src / general.c
index 052c7e1..417fe96 100644 (file)
@@ -12,7 +12,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,
@@ -50,6 +50,7 @@ void adns__lprintf(adns_state ads, const char *fmt, ...) {
 
 void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent,
                 int serv, adns_query qu, const char *fmt, va_list al) {
+  char buf[ADNS_ADDR2TEXT_BUFLEN];
   const char *bef, *aft;
   vbuf vb;
   
@@ -83,9 +84,8 @@ void adns__vdiag(adns_state ads, const char *pfx, adns_initflags prevent,
   }
   
   if (serv>=0) {
-    assert(ads->servers[serv].addr.sa.sa_family==AF_INET);
     adns__lprintf(ads,"%sNS=%s",bef,
-                 inet_ntoa(ads->servers[serv].addr.inet.sin_addr));
+                 adns__sockaddr_ntoa(&ads->servers[serv].addr.sa, buf));
     bef=", "; aft=")\n";
   }