gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r10996 - gnunet/src/hostlist


From: gnunet
Subject: [GNUnet-SVN] r10996 - gnunet/src/hostlist
Date: Tue, 20 Apr 2010 16:26:45 +0200

Author: wachs
Date: 2010-04-20 16:26:45 +0200 (Tue, 20 Apr 2010)
New Revision: 10996

Modified:
   gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
Log:


Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c  2010-04-20 
13:47:58 UTC (rev 10995)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c  2010-04-20 
14:26:45 UTC (rev 10996)
@@ -206,6 +206,8 @@
 static void
 setup_learn_peer (struct PeerContext *p, const char *cfgname)
 {
+  char * filename;
+  unsigned int result;
   p->cfg = GNUNET_CONFIGURATION_create ();
 #if START_ARM
   p->arm_pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
@@ -216,6 +218,20 @@
                                         "-c", cfgname, NULL);
 #endif
   GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
+  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string (p->cfg,
+                                                          "HOSTLIST",
+                                                          "HOSTLISTFILE",
+                                                          &filename))
+  {
+  if ( GNUNET_YES == GNUNET_DISK_file_test (filename) )
+    {
+      result = remove (filename);
+      if (result == 0)
+      GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+            _("Hostlist hostlist file `%s' was removed\n"),filename);
+    }
+  }
+  GNUNET_free ( filename );
   GNUNET_ARM_start_services (p->cfg, sched, "core", NULL);
 
   p->core = GNUNET_CORE_connect (sched, p->cfg,





reply via email to

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