diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-08 13:03:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-08 13:03:19 +0000 |
commit | c5b4eaa5e50c1c34f74852ff001772663b0b586a (patch) | |
tree | b9a8fee10db372b14a9f9153b60c54a414d264b7 /src | |
parent | 8ccaf285bc9abc7b9e224fa106656c874c3294ef (diff) | |
download | gnunet-c5b4eaa5e50c1c34f74852ff001772663b0b586a.tar.gz gnunet-c5b4eaa5e50c1c34f74852ff001772663b0b586a.zip |
-starting build system for consensus
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/consensus/Makefile.am | 48 | ||||
-rw-r--r-- | src/consensus/consensus.conf.in | 11 | ||||
-rw-r--r-- | src/consensus/gnunet-service-consensus.cc | 10 | ||||
-rw-r--r-- | src/testbed/gnunet-testbed-profiler.c | 9 |
5 files changed, 75 insertions, 5 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 503b25a45..08b93efb0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -3,7 +3,7 @@ | |||
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | if HAVE_EXPERIMENTAL | 5 | if HAVE_EXPERIMENTAL |
6 | EXP_DIR = chat dv | 6 | EXP_DIR = chat dv consensus |
7 | endif | 7 | endif |
8 | 8 | ||
9 | if LINUX | 9 | if LINUX |
diff --git a/src/consensus/Makefile.am b/src/consensus/Makefile.am new file mode 100644 index 000000000..2041ec1ac --- /dev/null +++ b/src/consensus/Makefile.am | |||
@@ -0,0 +1,48 @@ | |||
1 | INCLUDES = -I$(top_srcdir)/src/include | ||
2 | |||
3 | pkgcfgdir= $(pkgdatadir)/config.d/ | ||
4 | |||
5 | libexecdir= $(pkglibdir)/libexec/ | ||
6 | |||
7 | pkgcfg_DATA = \ | ||
8 | consensus.conf | ||
9 | |||
10 | if MINGW | ||
11 | WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols | ||
12 | endif | ||
13 | |||
14 | if USE_COVERAGE | ||
15 | AM_CFLAGS = -fprofile-arcs -ftest-coverage | ||
16 | endif | ||
17 | |||
18 | #bin_PROGRAMS = \ | ||
19 | # gnunet-consensus | ||
20 | |||
21 | libexec_PROGRAMS = \ | ||
22 | gnunet-service-consensus | ||
23 | |||
24 | #gnunet_consensus_SOURCES = \ | ||
25 | # gnunet-consensus.c | ||
26 | #gnunet_consensus_LDADD = \ | ||
27 | # $(top_builddir)/src/util/libgnunetutil.la \ | ||
28 | # $(GN_LIBINTL) | ||
29 | |||
30 | gnunet_service_consensus_SOURCES = \ | ||
31 | gnunet-service-consensus.cc | ||
32 | gnunet_service_consensus_LDADD = \ | ||
33 | $(top_builddir)/src/util/libgnunetutil.la \ | ||
34 | $(GN_LIBINTL) | ||
35 | |||
36 | |||
37 | #check_PROGRAMS = \ | ||
38 | # test_consensus_api | ||
39 | |||
40 | #if ENABLE_TEST_RUN | ||
41 | #TESTS = $(check_PROGRAMS) | ||
42 | #endif | ||
43 | # | ||
44 | #test_consensus_api_SOURCES = \ | ||
45 | # test_consensus_api.c | ||
46 | #test_consensus_api_LDADD = \ | ||
47 | # $(top_builddir)/src/util/libgnunetutil.la | ||
48 | |||
diff --git a/src/consensus/consensus.conf.in b/src/consensus/consensus.conf.in new file mode 100644 index 000000000..18e976deb --- /dev/null +++ b/src/consensus/consensus.conf.in | |||
@@ -0,0 +1,11 @@ | |||
1 | [consensus] | ||
2 | AUTOSTART = YES | ||
3 | @UNIXONLY@ PORT = 2103 | ||
4 | HOSTNAME = localhost | ||
5 | HOME = $SERVICEHOME | ||
6 | BINARY = gnunet-service-consensus | ||
7 | ACCEPT_FROM = 127.0.0.1; | ||
8 | ACCEPT_FROM6 = ::1; | ||
9 | UNIXPATH = /tmp/gnunet-service-consensus.sock | ||
10 | UNIX_MATCH_UID = YES | ||
11 | UNIX_MATCH_GID = YES | ||
diff --git a/src/consensus/gnunet-service-consensus.cc b/src/consensus/gnunet-service-consensus.cc new file mode 100644 index 000000000..d5e829e51 --- /dev/null +++ b/src/consensus/gnunet-service-consensus.cc | |||
@@ -0,0 +1,10 @@ | |||
1 | #include <cstdio> | ||
2 | #include <iostream> | ||
3 | |||
4 | using namespace std; | ||
5 | |||
6 | int main () | ||
7 | { | ||
8 | cout << "Hello world" << endl; | ||
9 | return 0; | ||
10 | } | ||
diff --git a/src/testbed/gnunet-testbed-profiler.c b/src/testbed/gnunet-testbed-profiler.c index 99efa6741..9bfeaddd2 100644 --- a/src/testbed/gnunet-testbed-profiler.c +++ b/src/testbed/gnunet-testbed-profiler.c | |||
@@ -297,9 +297,6 @@ do_abort (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | 299 | ||
300 | |||
301 | |||
302 | |||
303 | /** | 300 | /** |
304 | * Functions of this signature are called when a peer has been successfully | 301 | * Functions of this signature are called when a peer has been successfully |
305 | * started or stopped. | 302 | * started or stopped. |
@@ -335,7 +332,9 @@ peer_churn_cb (void *cls, const char *emsg) | |||
335 | fflush (stdout); | 332 | fflush (stdout); |
336 | result = GNUNET_OK; | 333 | result = GNUNET_OK; |
337 | if ((0 == num_links) && (topology == GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI)) | 334 | if ((0 == num_links) && (topology == GNUNET_TESTBED_TOPOLOGY_ERDOS_RENYI)) |
338 | { | 335 | { |
336 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); | ||
337 | (void) getc (stdin); | ||
339 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 338 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
340 | return; | 339 | return; |
341 | } | 340 | } |
@@ -562,6 +561,8 @@ controller_event_cb (void *cls, | |||
562 | { | 561 | { |
563 | print_overlay_links_summary (); | 562 | print_overlay_links_summary (); |
564 | result = GNUNET_OK; | 563 | result = GNUNET_OK; |
564 | fprintf (stdout, "Testbed running, waiting for keystroke to shut down\n"); | ||
565 | (void) getc (stdin); | ||
565 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); | 566 | shutdown_task = GNUNET_SCHEDULER_add_now (&do_shutdown, NULL); |
566 | } | 567 | } |
567 | break; | 568 | break; |