X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fchat%2Ftest_chat_private.c;h=b911d091fbef7ccedaccb7dcfcd0d4ee2d453cb7;hb=a250da032ba65252d9da96e8429b22e265c69980;hp=ec170a1ddef764551f7e53109eb47355ddde85bd;hpb=8f9464256fc06a884bf589b4004262a0549d11b3;p=oweals%2Fgnunet.git diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c index ec170a1dd..b911d091f 100644 --- a/src/chat/test_chat_private.c +++ b/src/chat/test_chat_private.c @@ -32,8 +32,6 @@ #define VERBOSE GNUNET_NO -#define START_ARM GNUNET_YES - /** * How long until we give up on passing the test? */ @@ -47,9 +45,7 @@ struct PeerContext { struct GNUNET_CONFIGURATION_Handle *cfg; -#if START_ARM struct GNUNET_OS_Process *arm_proc; -#endif }; struct Wanted @@ -124,30 +120,28 @@ static int bob_ready; static int is_p2p; -struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *bob_public_key = NULL; +static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *bob_public_key; static void setup_peer (struct PeerContext *p, const char *cfgname) { + char *binary; + + binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm"); p->cfg = GNUNET_CONFIGURATION_create (); -#if START_ARM p->arm_proc = - GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", + GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary, "gnunet-service-arm", -#if VERBOSE - "-L", "DEBUG", -#endif "-c", cfgname, NULL); -#endif GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); + GNUNET_free (binary); } static void stop_arm (struct PeerContext *p) { -#if START_ARM if (0 != GNUNET_OS_process_kill (p->arm_proc, SIGTERM)) GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); if (GNUNET_OS_process_wait (p->arm_proc) != GNUNET_OK) @@ -156,7 +150,6 @@ stop_arm (struct PeerContext *p) GNUNET_OS_process_get_pid (p->arm_proc)); GNUNET_OS_process_destroy (p->arm_proc); p->arm_proc = NULL; -#endif GNUNET_CONFIGURATION_destroy (p->cfg); } @@ -614,9 +607,6 @@ main (int argc, char *argv[]) "test-chat", "-c", "test_chat_data.conf", -#if VERBOSE - "-L", "DEBUG", -#endif NULL }; struct GNUNET_GETOPT_CommandLineOption options[] = { @@ -624,11 +614,7 @@ main (int argc, char *argv[]) }; GNUNET_log_setup ("test_chat", -#if VERBOSE - "DEBUG", -#else "WARNING", -#endif NULL); if (strstr (argv[0], "p2p") != NULL) {