aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/Makefile.am28
-rw-r--r--src/transport/plugin_cmd_simple_send.c15
-rw-r--r--src/transport/test_transport_api_cmd_simple_send.c11
3 files changed, 29 insertions, 25 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index 55a338729..e19ebd8e9 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -398,20 +398,20 @@ plugin_LTLIBRARIES = \
398 $(HTTP_SERVER_PLUGIN_LA) \ 398 $(HTTP_SERVER_PLUGIN_LA) \
399 $(HTTPS_SERVER_PLUGIN_LA) \ 399 $(HTTPS_SERVER_PLUGIN_LA) \
400 $(WLAN_PLUGIN_LA) \ 400 $(WLAN_PLUGIN_LA) \
401 $(BT_PLUGIN_LA) 401 $(BT_PLUGIN_LA) \
402# libgnunet_plugin_cmd_simple_send.la 402 libgnunet_plugin_cmd_simple_send.la
403 403
404#libgnunet_plugin_cmd_simple_send_la_SOURCES = \ 404libgnunet_plugin_cmd_simple_send_la_SOURCES = \
405# plugin_cmd_simple_send.c 405 plugin_cmd_simple_send.c
406#libgnunet_plugin_cmd_simple_send_la_LIBADD = \ 406libgnunet_plugin_cmd_simple_send_la_LIBADD = \
407# $(top_builddir)/src/util/libgnunetutil.la \ 407 $(top_builddir)/src/util/libgnunetutil.la \
408# $(top_builddir)/src/testing/libgnunettesting.la \ 408 $(top_builddir)/src/testing/libgnunettesting.la \
409# $(top_builddir)/src/statistics/libgnunetstatistics.la \ 409 $(top_builddir)/src/statistics/libgnunetstatistics.la \
410# $(top_builddir)/src/testbed/libgnunettestbed.la \ 410 $(top_builddir)/src/testbed/libgnunettestbed.la \
411# libgnunettransporttesting2.la \ 411 libgnunettransporttesting2.la \
412# $(LTLIBINTL) 412 $(LTLIBINTL)
413#libgnunet_plugin_cmd_simple_send_la_LDFLAGS = \ 413libgnunet_plugin_cmd_simple_send_la_LDFLAGS = \
414# $(GN_PLUGIN_LDFLAGS) 414 $(GN_PLUGIN_LDFLAGS)
415 415
416if HAVE_EXPERIMENTAL 416if HAVE_EXPERIMENTAL
417plugin_LTLIBRARIES += libgnunet_plugin_transport_udp.la 417plugin_LTLIBRARIES += libgnunet_plugin_transport_udp.la
diff --git a/src/transport/plugin_cmd_simple_send.c b/src/transport/plugin_cmd_simple_send.c
index e2407c8c0..2a4a8c137 100644
--- a/src/transport/plugin_cmd_simple_send.c
+++ b/src/transport/plugin_cmd_simple_send.c
@@ -98,13 +98,13 @@ start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip,
98 n); 98 n);
99 99
100 LOG (GNUNET_ERROR_TYPE_ERROR, 100 LOG (GNUNET_ERROR_TYPE_ERROR,
101 "cfgname: %s\n", 101 "plugin cfgname: %s\n",
102 cfgname); 102 cfgname);
103 103
104 LOG (GNUNET_ERROR_TYPE_ERROR, 104 LOG (GNUNET_ERROR_TYPE_ERROR,
105 "node ip: %s\n", 105 "node ip: %s\n",
106 node_ip); 106 node_ip);
107 107
108 testdir = GNUNET_malloc (strlen (BASE_DIR) + strlen (m) + strlen (n) 108 testdir = GNUNET_malloc (strlen (BASE_DIR) + strlen (m) + strlen (n)
109 + 1); 109 + 1);
110 110
@@ -142,11 +142,12 @@ start_testcase (TESTBED_CMD_HELPER_write_cb write_message, char *router_ip,
142 "start-peer-1", 142 "start-peer-1",
143 "this is useless"), 143 "this is useless"),
144 GNUNET_TRANSPORT_cmd_send_simple ("send-simple-1", 144 GNUNET_TRANSPORT_cmd_send_simple ("send-simple-1",
145 m, 145 m,
146 n, 146 n,
147 0, 147 (atoi (n) - 1) * atoi (local_m) + atoi (
148 "start-peer-1", 148 m),
149 "this is useless"), 149 "start-peer-1",
150 "this is useless"),
150 GNUNET_TESTING_cmd_local_test_finished ("local-test-finished-1", 151 GNUNET_TESTING_cmd_local_test_finished ("local-test-finished-1",
151 write_message) 152 write_message)
152 }; 153 };
diff --git a/src/transport/test_transport_api_cmd_simple_send.c b/src/transport/test_transport_api_cmd_simple_send.c
index 9ae8fcc2b..26da53c47 100644
--- a/src/transport/test_transport_api_cmd_simple_send.c
+++ b/src/transport/test_transport_api_cmd_simple_send.c
@@ -28,6 +28,10 @@
28#include "gnunet_testbed_ng_service.h" 28#include "gnunet_testbed_ng_service.h"
29#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
30 30
31#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
32
33static unsigned int rv = 0;
34
31 35
32/** 36/**
33 * Main function to run the test cases. 37 * Main function to run the test cases.
@@ -45,7 +49,8 @@ run (void *cls)
45 GNUNET_TESTBED_cmd_netjail_start_testbed ("netjail-start-testbed-1", 49 GNUNET_TESTBED_cmd_netjail_start_testbed ("netjail-start-testbed-1",
46 "2", 50 "2",
47 "1", 51 "1",
48 "libgnunet_plugin_cmd_simple_send"), 52 "libgnunet_plugin_cmd_simple_send",
53 &rv),
49 GNUNET_TESTBED_cmd_stop_testbed ("stop-testbed", 54 GNUNET_TESTBED_cmd_stop_testbed ("stop-testbed",
50 "netjail-start-testbed-1", 55 "netjail-start-testbed-1",
51 "2", 56 "2",
@@ -58,7 +63,7 @@ run (void *cls)
58 63
59 GNUNET_TESTING_run (NULL, 64 GNUNET_TESTING_run (NULL,
60 commands, 65 commands,
61 GNUNET_TIME_UNIT_FOREVER_REL); 66 TIMEOUT);
62} 67}
63 68
64 69
@@ -66,8 +71,6 @@ int
66main (int argc, 71main (int argc,
67 char *const *argv) 72 char *const *argv)
68{ 73{
69 int rv = 0;
70
71 GNUNET_log_setup ("test-netjail", 74 GNUNET_log_setup ("test-netjail",
72 "DEBUG", 75 "DEBUG",
73 NULL); 76 NULL);