gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3333 - in GNUnet/src/applications/fs: lib module


From: grothoff
Subject: [GNUnet-SVN] r3333 - in GNUnet/src/applications/fs: lib module
Date: Sun, 27 Aug 2006 13:51:51 -0700 (PDT)

Author: grothoff
Date: 2006-08-27 13:51:49 -0700 (Sun, 27 Aug 2006)
New Revision: 3333

Modified:
   GNUnet/src/applications/fs/lib/fslibtest.c
   GNUnet/src/applications/fs/module/ondemand.c
Log:
fix

Modified: GNUnet/src/applications/fs/lib/fslibtest.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslibtest.c  2006-08-27 20:45:51 UTC (rev 
3332)
+++ GNUnet/src/applications/fs/lib/fslibtest.c  2006-08-27 20:51:49 UTC (rev 
3333)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2004, 2005 Christian Grothoff (and other contributing authors)
+     (C) 2004, 2005, 2006 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -200,9 +200,12 @@
   return closure.found;
 }
 
+#define START_DAEMON 0
 
 int main(int argc, char * argv[]){
+#if START_DAEMON
   pid_t daemon;
+#endif
   int ok;
   struct FS_SEARCH_CONTEXT * ctx = NULL;
   struct FS_SEARCH_HANDLE * hnd;
@@ -225,11 +228,13 @@
   }
   now = get_time();
   cron = cron_create(NULL);
+#if START_DAEMON
   daemon = os_daemon_start(NULL,
                           cfg,
                           "peer.conf",
                           NO);
   GE_ASSERT(NULL, daemon > 0);
+#endif
   ok = YES;
   cron_start(cron);
   lock = MUTEX_CREATE(NO);
@@ -361,7 +366,9 @@
   MUTEX_DESTROY(lock);
   cron_stop(cron);
   cron_destroy(cron);
+#if START_DAEMON
   GE_ASSERT(NULL, OK == os_daemon_stop(NULL, daemon));
+#endif
   return (ok == YES) ? 0 : 1;
 }
 

Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c        2006-08-27 20:45:51 UTC 
(rev 3332)
+++ GNUnet/src/applications/fs/module/ondemand.c        2006-08-27 20:51:49 UTC 
(rev 3333)
@@ -687,25 +687,22 @@
     return SYSERR;
   }
   ectx = capi->ectx;
-  if (0 != GC_get_configuration_value_string(capi->cfg,
-                                            "FS",
-                                            "INDEX-DIRECTORY",
-                                            NULL,
-                                            &tmp)) {
-    GC_get_configuration_value_string(capi->cfg,
+  GC_get_configuration_value_filename(capi->cfg,
                                      "GNUNETD",
                                      "GNUNETD_HOME",
                                      VAR_DAEMON_DIRECTORY,
                                      &tmp);
-    GE_ASSERT(ectx,
-             NULL != tmp);
-    tmp = REALLOC(tmp,
-                 strlen(tmp) +
-                 strlen("/data/shared/") + 1);
-    strcat(tmp, "/data/shared/");
-  }
-  index_directory = string_expandFileName(ectx,
-                                         tmp);
+  GE_ASSERT(ectx,
+           NULL != tmp);
+  tmp = REALLOC(tmp,
+               strlen(tmp) +
+               strlen("/data/shared/") + 1);
+  strcat(tmp, "/data/shared/"); 
+  GC_get_configuration_value_filename(capi->cfg,
+                                     "FS",
+                                     "INDEX-DIRECTORY",
+                                     tmp,
+                                     &index_directory);
   FREE(tmp);
   disk_directory_create(ectx,
                        index_directory); /* just in case */  





reply via email to

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