gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r24708 - gnunet/src/arm
Date: Mon, 5 Nov 2012 11:44:29 +0100

Author: grothoff
Date: 2012-11-05 11:44:29 +0100 (Mon, 05 Nov 2012)
New Revision: 24708

Modified:
   gnunet/src/arm/arm_api.c
   gnunet/src/arm/do_start_process.c
   gnunet/src/arm/gnunet-service-arm.c
Log:
-fix use of PREFIX with libexec

Modified: gnunet/src/arm/arm_api.c
===================================================================
--- gnunet/src/arm/arm_api.c    2012-11-05 10:04:41 UTC (rev 24707)
+++ gnunet/src/arm/arm_api.c    2012-11-05 10:44:29 UTC (rev 24708)
@@ -316,6 +316,7 @@
 {
   struct RequestContext *pos = cls;
   struct GNUNET_OS_Process *proc;
+  char *cbinary;
   char *binary;
   char *config;
   char *loprefix;
@@ -344,7 +345,7 @@
     lopostfix = GNUNET_strdup ("");
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (pos->h->cfg, "arm", "BINARY",
-                                            &binary))
+                                            &cbinary))
   {
     GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
                               "arm", "BINARY");
@@ -363,12 +364,14 @@
                               "arm", "CONFIG");
     if (pos->callback != NULL)
       pos->callback (pos->cls, GNUNET_ARM_PROCESS_UNKNOWN);
-    GNUNET_free (binary);
+    GNUNET_free (cbinary);
     GNUNET_free (pos);
     GNUNET_free (loprefix);
     GNUNET_free (lopostfix);
     return;
   }
+  binary = GNUNET_OS_get_libexec_binary_path (cbinary);
+  GNUNET_free (cbinary);
   if ((GNUNET_YES ==
        GNUNET_CONFIGURATION_have_value (pos->h->cfg, "TESTING", "WEAKRANDOM"))
       && (GNUNET_YES ==

Modified: gnunet/src/arm/do_start_process.c
===================================================================
--- gnunet/src/arm/do_start_process.c   2012-11-05 10:04:41 UTC (rev 24707)
+++ gnunet/src/arm/do_start_process.c   2012-11-05 10:44:29 UTC (rev 24708)
@@ -119,13 +119,12 @@
 /* *INDENT-ON* */
   va_end (ap);
   argv[argv_size] = NULL;
-  binary_path = GNUNET_OS_get_libexec_binary_path (argv[0]);
+  binary_path = argv[0];
   proc = GNUNET_OS_start_process_v (pipe_control, std_inheritance, lsocks, 
                                    binary_path, argv);
   while (argv_size > 0)
     GNUNET_free (argv[--argv_size]);
   GNUNET_free (argv);
-  GNUNET_free (binary_path);
   return proc;
 }
 

Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2012-11-05 10:04:41 UTC (rev 24707)
+++ gnunet/src/arm/gnunet-service-arm.c 2012-11-05 10:44:29 UTC (rev 24708)
@@ -240,6 +240,7 @@
   struct ServiceListeningInfo *sli;
   SOCKTYPE *lsocks;
   unsigned int ls;
+  char *binary;
 
   /* calculate listen socket list */
   lsocks = NULL;
@@ -311,17 +312,19 @@
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Starting service `%s' using binary `%s' and configuration 
`%s'\n",
              sl->name, sl->binary, sl->config);
+  binary = GNUNET_OS_get_libexec_binary_path (sl->binary);
   GNUNET_assert (NULL == sl->proc);
   if (GNUNET_YES == use_debug)
     sl->proc =
       do_start_process (sl->pipe_control, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
-                       lsocks, loprefix, sl->binary, "-c", sl->config, "-L",
+                       lsocks, loprefix, binary, "-c", sl->config, "-L",
                        "DEBUG", options, NULL);
   else
     sl->proc =
       do_start_process (sl->pipe_control, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
-                       lsocks, loprefix, sl->binary, "-c", sl->config,
+                       lsocks, loprefix, binary, "-c", sl->config,
                        options, NULL);
+  GNUNET_free (binary);
   if (sl->proc == NULL)
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Failed to start service `%s'\n"),
                sl->name);




reply via email to

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