gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r10921 - gnunet/src/util
Date: Thu, 15 Apr 2010 18:47:24 +0200

Author: wachs
Date: 2010-04-15 18:47:24 +0200 (Thu, 15 Apr 2010)
New Revision: 10921

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


Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c      2010-04-15 16:46:47 UTC (rev 10920)
+++ gnunet/src/util/resolver_api.c      2010-04-15 16:47:24 UTC (rev 10921)
@@ -671,33 +671,26 @@
 /**
  * Get local hostname
  *
- * @param sched scheduler to use
- * @param cfg configuration to use
- * @param callback function to call with addresses
- * @param cls closure for callback
- * @return handle that can be used to cancel the request, NULL on error
+ * @param
  */
-void
-GNUNET_RESOLVER_local_hostname_get (struct GNUNET_SCHEDULER_Handle *sched,
-                                    const struct GNUNET_CONFIGURATION_Handle 
*cfg,
-                                    GNUNET_RESOLVER_HostnameCallback callback,
-                                    void *cls)
+char *
+GNUNET_RESOLVER_local_hostname_get ( )
 {
 
   char hostname[GNUNET_OS_get_hostname_max_length() + 1];
 
-  check_config (cfg);
+
   if (0 != gethostname (hostname, sizeof (hostname) - 1))
     {
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR |
                            GNUNET_ERROR_TYPE_BULK, "gethostname");
-      return;
+      return NULL;
     }
 #if DEBUG_RESOLVER
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               _("Resolving our hostname `%s'\n"), hostname);
 #endif
-  callback (cls, hostname);
+  return GNUNET_strdup (hostname);
 }
 
 /**





reply via email to

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