aboutsummaryrefslogtreecommitdiff
path: root/src/chat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-29 16:14:03 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-29 16:14:03 +0000
commitbcbcf005b4864ac5557c31da10521126d8880849 (patch)
tree444cafefb16e1c5a4ba13ce2db07d6ec1f37675e /src/chat
parent119193d6350bbbd8c6ecbd60ccc8301223d6f6d6 (diff)
downloadgnunet-bcbcf005b4864ac5557c31da10521126d8880849.tar.gz
gnunet-bcbcf005b4864ac5557c31da10521126d8880849.zip
installing all service, daemon and helper binaries to lib/gnunet/libexec/; updating code to run binaries from new location, which is no longer in PATH
Diffstat (limited to 'src/chat')
-rw-r--r--src/chat/Makefile.am6
-rw-r--r--src/chat/test_chat.c9
-rw-r--r--src/chat/test_chat_private.c18
3 files changed, 16 insertions, 17 deletions
diff --git a/src/chat/Makefile.am b/src/chat/Makefile.am
index 213283684..af33a8bb0 100644
--- a/src/chat/Makefile.am
+++ b/src/chat/Makefile.am
@@ -2,6 +2,8 @@ INCLUDES = -I$(top_srcdir)/src/include
2 2
3pkgcfgdir= $(pkgdatadir)/config.d/ 3pkgcfgdir= $(pkgdatadir)/config.d/
4 4
5libexecdir= $(pkglibdir)/libexec/
6
5pkgcfg_DATA = \ 7pkgcfg_DATA = \
6 chat.conf 8 chat.conf
7 9
@@ -25,8 +27,10 @@ libgnunetchat_la_LDFLAGS = \
25 $(GN_LIB_LDFLAGS) $(WINFLAGS) \ 27 $(GN_LIB_LDFLAGS) $(WINFLAGS) \
26 -version-info 0:0:0 28 -version-info 0:0:0
27 29
30libexec_PROGRAMS = \
31 gnunet-service-chat
32
28bin_PROGRAMS = \ 33bin_PROGRAMS = \
29 gnunet-service-chat \
30 gnunet-chat 34 gnunet-chat
31 35
32gnunet_service_chat_SOURCES = \ 36gnunet_service_chat_SOURCES = \
diff --git a/src/chat/test_chat.c b/src/chat/test_chat.c
index 5dcb87966..24a1e38da 100644
--- a/src/chat/test_chat.c
+++ b/src/chat/test_chat.c
@@ -116,17 +116,18 @@ static int is_auth;
116static void 116static void
117setup_peer (struct PeerContext *p, const char *cfgname) 117setup_peer (struct PeerContext *p, const char *cfgname)
118{ 118{
119 char *binary;
120
121 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
119 p->cfg = GNUNET_CONFIGURATION_create (); 122 p->cfg = GNUNET_CONFIGURATION_create ();
120#if START_ARM 123#if START_ARM
121 p->arm_proc = 124 p->arm_proc =
122 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", 125 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
123 "gnunet-service-arm", 126 "gnunet-service-arm",
124#if VERBOSE
125 "-L", "DEBUG",
126#endif
127 "-c", cfgname, NULL); 127 "-c", cfgname, NULL);
128#endif 128#endif
129 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 129 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
130 GNUNET_free (binary);
130} 131}
131 132
132 133
diff --git a/src/chat/test_chat_private.c b/src/chat/test_chat_private.c
index ec170a1dd..64150c107 100644
--- a/src/chat/test_chat_private.c
+++ b/src/chat/test_chat_private.c
@@ -124,23 +124,24 @@ static int bob_ready;
124 124
125static int is_p2p; 125static int is_p2p;
126 126
127struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *bob_public_key = NULL; 127static struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *bob_public_key;
128 128
129 129
130static void 130static void
131setup_peer (struct PeerContext *p, const char *cfgname) 131setup_peer (struct PeerContext *p, const char *cfgname)
132{ 132{
133 char *binary;
134
135 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
133 p->cfg = GNUNET_CONFIGURATION_create (); 136 p->cfg = GNUNET_CONFIGURATION_create ();
134#if START_ARM 137#if START_ARM
135 p->arm_proc = 138 p->arm_proc =
136 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-service-arm", 139 GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
137 "gnunet-service-arm", 140 "gnunet-service-arm",
138#if VERBOSE
139 "-L", "DEBUG",
140#endif
141 "-c", cfgname, NULL); 141 "-c", cfgname, NULL);
142#endif 142#endif
143 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname)); 143 GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
144 GNUNET_free (binary);
144} 145}
145 146
146 147
@@ -614,9 +615,6 @@ main (int argc, char *argv[])
614 "test-chat", 615 "test-chat",
615 "-c", 616 "-c",
616 "test_chat_data.conf", 617 "test_chat_data.conf",
617#if VERBOSE
618 "-L", "DEBUG",
619#endif
620 NULL 618 NULL
621 }; 619 };
622 struct GNUNET_GETOPT_CommandLineOption options[] = { 620 struct GNUNET_GETOPT_CommandLineOption options[] = {
@@ -624,11 +622,7 @@ main (int argc, char *argv[])
624 }; 622 };
625 623
626 GNUNET_log_setup ("test_chat", 624 GNUNET_log_setup ("test_chat",
627#if VERBOSE
628 "DEBUG",
629#else
630 "WARNING", 625 "WARNING",
631#endif
632 NULL); 626 NULL);
633 if (strstr (argv[0], "p2p") != NULL) 627 if (strstr (argv[0], "p2p") != NULL)
634 { 628 {