lnk
[oweals/gnunet.git] / src / resolver / gnunet-service-resolver.c
index ac50f02d061d122e2aaf4a5a7222ebd44c6a2f76..304f11b7b4a1bb7d0cd67f1fde7e532f3c3c5e68 100644 (file)
@@ -58,7 +58,11 @@ getnameinfo_resolve (struct IPCache *cache)
 {
   char hostname[256];
 
-  if (0 == getnameinfo (cache->sa, cache->salen, hostname, 255, NULL, 0, 0))
+  if (0 == getnameinfo (cache->sa, 
+                       cache->salen, 
+                       hostname, 
+                       sizeof(hostname), 
+                       NULL, 0, 0))
     cache->addr = GNUNET_strdup (hostname);
 }
 #endif
@@ -220,7 +224,14 @@ getaddrinfo_resolve (struct GNUNET_SERVER_TransmitContext *tc,
                    AF_INET) ? "IPv4" : ((domain ==
                                          AF_INET6) ? "IPv6" : "any"),
                   gai_strerror (s));
-      if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) || (s == EAI_SYSTEM))
+      if ((s == EAI_BADFLAGS) || (s == EAI_MEMORY) ||
+#ifndef MINGW
+          (s == EAI_SYSTEM)
+#else
+          // FIXME NILS
+          1
+#endif
+      )
         return GNUNET_NO;       /* other function may still succeed */
       return GNUNET_SYSERR;
     }
@@ -432,7 +443,7 @@ static struct GNUNET_SERVER_MessageHandler handlers[] = {
 
 
 /**
- * Process statistics requests.
+ * Process resolver requests.
  *
  * @param cls closure
  * @param sched scheduler to use
@@ -443,7 +454,7 @@ static void
 run (void *cls,
      struct GNUNET_SCHEDULER_Handle *sched,
      struct GNUNET_SERVER_Handle *server,
-     struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   GNUNET_SERVER_add_handlers (server, handlers);
 }