gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r11031 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r11031 - gnunet/src/util
Date: Thu, 22 Apr 2010 13:32:51 +0200

Author: wachs
Date: 2010-04-22 13:32:51 +0200 (Thu, 22 Apr 2010)
New Revision: 11031

Modified:
   gnunet/src/util/test_resolver_api.c
Log:


Modified: gnunet/src/util/test_resolver_api.c
===================================================================
--- gnunet/src/util/test_resolver_api.c 2010-04-22 11:32:42 UTC (rev 11030)
+++ gnunet/src/util/test_resolver_api.c 2010-04-22 11:32:51 UTC (rev 11031)
@@ -139,7 +139,7 @@
     {
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR |
                            GNUNET_ERROR_TYPE_BULK, "gethostname");
-      return NULL;
+      return;
     }
 #if DEBUG_RESOLVER
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -151,7 +151,7 @@
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _("Could not resolve our FQDN : %s %u\n"),
                 hstrerror (h_errno), h_errno);
-    return NULL;
+    return;
   }
 
   GNUNET_assert( 0 != host);
@@ -165,38 +165,8 @@
   GNUNET_assert( 0 == result);
 }
 
-static void
-check_local_hostname(void *cls, const char *hostname)
-{
-  int result = 0;
 
-  char own_hostname[GNUNET_OS_get_hostname_max_length() + 1];
-#if DEBUG_RESOLVER
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-          "Hostname resolved here is `%s'.\n", own_hostname);
-      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-          "Hostname resolved using resolver is `%s'.\n", hostname);
-#endif
 
-  result = gethostname (own_hostname, sizeof (own_hostname) - 1);
-
-  if ( 0 != result )
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-        "Could not resolve local hostname\n", own_hostname);
-  }
-  GNUNET_assert( 0 == result);
-
-  result = strcmp(hostname, own_hostname);
-  if ( 0 != result )
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-        "Local resolved and resolver resolved hostnames are not equal\n", 
own_hostname);
-  }
-  GNUNET_assert( 0 == result);
-}
-
-
 static void
 check_rootserver_ip(void *cls, const struct sockaddr *sa, socklen_t salen)
 {
@@ -256,7 +226,6 @@
   struct GNUNET_TIME_Relative timeout = GNUNET_TIME_relative_multiply(
       GNUNET_TIME_UNIT_MILLISECONDS, 2500);
   int count_ips = 0;
-  char * own_hostname;
   char * own_fqdn;
 
   memset(&sa, 0, sizeof(sa));
@@ -271,12 +240,6 @@
   GNUNET_RESOLVER_hostname_resolve(sched, cfg, AF_UNSPEC, timeout,
       &check_hostname, cls);
 
-  /*
-   * Looking up our own hostname
-   */
-  own_hostname = GNUNET_RESOLVER_local_hostname_get();
-  check_local_hostname( NULL, own_hostname);
-  GNUNET_free (own_hostname);
 
   /*
    * Looking up our own fqdn





reply via email to

[Prev in Thread] Current Thread [Next in Thread]