aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/helper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util/helper.c b/src/util/helper.c
index c0681c804..372f8407e 100644
--- a/src/util/helper.c
+++ b/src/util/helper.c
@@ -410,12 +410,16 @@ GNUNET_HELPER_start (int with_control_pipe,
410 GNUNET_HELPER_ExceptionCallback exp_cb, 410 GNUNET_HELPER_ExceptionCallback exp_cb,
411 void *cb_cls) 411 void *cb_cls)
412{ 412{
413 struct GNUNET_HELPER_Handle*h; 413 struct GNUNET_HELPER_Handle *h;
414 unsigned int c; 414 unsigned int c;
415 415
416 h = GNUNET_malloc (sizeof (struct GNUNET_HELPER_Handle)); 416 h = GNUNET_malloc (sizeof (struct GNUNET_HELPER_Handle));
417 h->with_control_pipe = with_control_pipe; 417 h->with_control_pipe = with_control_pipe;
418 h->binary_name = GNUNET_OS_get_libexec_binary_path (binary_name); 418 /* Lookup in libexec path only if we are starting gnunet helpers */
419 if (NULL != strstr (binary_name, "gnunet"))
420 h->binary_name = GNUNET_OS_get_libexec_binary_path (binary_name);
421 else
422 h->binary_name = strdup (binary_name);
419 for (c = 0; NULL != binary_argv[c]; c++) 423 for (c = 0; NULL != binary_argv[c]; c++)
420 c++; 424 c++;
421 h->binary_argv = GNUNET_malloc (sizeof (char *) * (c + 1)); 425 h->binary_argv = GNUNET_malloc (sizeof (char *) * (c + 1));