gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r24239 - gnunet/src/arm


From: gnunet
Subject: [GNUnet-SVN] r24239 - gnunet/src/arm
Date: Tue, 9 Oct 2012 20:46:25 +0200

Author: grothoff
Date: 2012-10-09 20:46:25 +0200 (Tue, 09 Oct 2012)
New Revision: 24239

Modified:
   gnunet/src/arm/arm.conf.in
   gnunet/src/arm/gnunet-service-arm.c
Log:
-use defaultconfig if config is missing

Modified: gnunet/src/arm/arm.conf.in
===================================================================
--- gnunet/src/arm/arm.conf.in  2012-10-09 18:43:01 UTC (rev 24238)
+++ gnunet/src/arm/arm.conf.in  2012-10-09 18:46:25 UTC (rev 24239)
@@ -10,6 +10,7 @@
 UNIXPATH = /tmp/gnunet-service-arm.sock
 UNIX_MATCH_UID = YES
 UNIX_MATCH_GID = YES
+CONFIG = $DEFAULTCONFIG
 
 # In the "-l" option, format characters from 'strftime' are allowed;
 # In the GLOBAL_POSTFIX, "{}" stands for the name of the respective

Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2012-10-09 18:43:01 UTC (rev 24238)
+++ gnunet/src/arm/gnunet-service-arm.c 2012-10-09 18:46:25 UTC (rev 24239)
@@ -1118,21 +1118,25 @@
     return;
   }
   config = NULL;
-  if ((GNUNET_OK !=
-       GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG",
-                                               &config)) ||
+  if (( (GNUNET_OK !=
+        GNUNET_CONFIGURATION_get_value_filename (cfg, section, "CONFIG",
+                                                 &config)) &&
+       (GNUNET_OK !=
+        GNUNET_CONFIGURATION_get_value_filename (cfg, "PATHS", "DEFAULTCONFIG",
+                                                 &config)) ) ||
+
       (0 != STAT (config, &sbuf)))
-    {
-      if (NULL == config)
-       GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, section, 
"CONFIG");
-      else
-       GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING, 
-                                  section, "CONFIG",
-                                  STRERROR (errno));
-      GNUNET_free (binary);
-      GNUNET_free_non_null (config);
-      return;
-    }
+  {
+    if (NULL == config)
+      GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING, section, "CONFIG");
+    else
+      GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING, 
+                                section, "CONFIG",
+                                STRERROR (errno));
+    GNUNET_free (binary);
+    GNUNET_free_non_null (config);
+    return;
+  }
   sl = GNUNET_malloc (sizeof (struct ServiceList));
   sl->name = GNUNET_strdup (section);
   sl->binary = binary;




reply via email to

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