summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2021-08-04 15:09:17 +0200
committert3sserakt <t3ss@posteo.de>2021-08-04 15:09:17 +0200
commit873381c653bbd96f376f8fa028fc49b5ec4fc721 (patch)
treef6072a5d222574528fb2ffe83ca5c5a30499f187 /src
parent22b6c43bb3508c0448f232429c86583ef09a991c (diff)
first cmd for a simple tng test running. part of cleanup and sanity check when starting missing
Diffstat (limited to 'src')
-rw-r--r--src/testbed/testbed_api.h2
-rw-r--r--src/testbed/testbed_api_cmd_netjail_start_testbed.c2
-rw-r--r--src/transport/gnunet-communicator-tcp.c2
-rw-r--r--src/transport/transport_api_cmd_connecting_peers.c12
-rw-r--r--src/transport/transport_api_cmd_send_simple.c1
5 files changed, 12 insertions, 7 deletions
diff --git a/src/testbed/testbed_api.h b/src/testbed/testbed_api.h
index 67aa6dc1c..9a54ca36c 100644
--- a/src/testbed/testbed_api.h
+++ b/src/testbed/testbed_api.h
@@ -40,7 +40,7 @@
/**
* Cmds Helper binary name
*/
-#define HELPER_CMDS_BINARY "./../testbed/gnunet-cmds-helper"
+#define HELPER_CMDS_BINARY "gnunet-cmds-helper"
/**
diff --git a/src/testbed/testbed_api_cmd_netjail_start_testbed.c b/src/testbed/testbed_api_cmd_netjail_start_testbed.c
index fa0084a0a..2b81c05d1 100644
--- a/src/testbed/testbed_api_cmd_netjail_start_testbed.c
+++ b/src/testbed/testbed_api_cmd_netjail_start_testbed.c
@@ -328,7 +328,7 @@ start_testbed (struct NetJailState *ns, struct
char *const script_argv[] = {NETJAIL_EXEC_SCRIPT,
m_char,
n_char,
- HELPER_CMDS_BINARY,
+ GNUNET_OS_get_libexec_binary_path(HELPER_CMDS_BINARY),
ns->global_n,
ns->local_m,
NULL};
diff --git a/src/transport/gnunet-communicator-tcp.c b/src/transport/gnunet-communicator-tcp.c
index fde85923b..10e2f7d40 100644
--- a/src/transport/gnunet-communicator-tcp.c
+++ b/src/transport/gnunet-communicator-tcp.c
@@ -2710,7 +2710,7 @@ proto_read_kx (void *cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Invalid TCP KX received from %s\n",
- GNUNET_a2s (queue->address, queue->address_len));
+ GNUNET_a2s (pq->address, pq->address_len));
gcry_cipher_close (queue->in_cipher);
GNUNET_free (queue);
free_proto_queue (pq);
diff --git a/src/transport/transport_api_cmd_connecting_peers.c b/src/transport/transport_api_cmd_connecting_peers.c
index 3148806c7..d5c4a5d48 100644
--- a/src/transport/transport_api_cmd_connecting_peers.c
+++ b/src/transport/transport_api_cmd_connecting_peers.c
@@ -62,6 +62,7 @@ connect_peers_run (void *cls,
//size_t *hello_size;
enum GNUNET_NetworkType nt = 0;
char *peer_id;
+ struct GNUNET_PeerIdentity *id;
peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label);
GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd,
@@ -74,21 +75,21 @@ connect_peers_run (void *cls,
"hello: %s\n",
hello);
- /*GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
+ GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd,
&id);
LOG (GNUNET_ERROR_TYPE_ERROR,
"pid %s\n",
- GNUNET_i2s_full(id));*/
+ GNUNET_i2s_full(id));
if(strstr(hello, "60002") != NULL)
{
addr = "tcp-192.168.15.2:60003";
- peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730";
+ peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG";
}
else
{
addr = "tcp-192.168.15.1:60002";
- peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG";
+ peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730";
}
LOG (GNUNET_ERROR_TYPE_ERROR,
@@ -139,6 +140,9 @@ connect_peers_finish (void *cls,
struct GNUNET_HashCode hc;
int node_number;
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Connect finished?\n");
+
peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label);
GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd,
&connected_peers_map);
diff --git a/src/transport/transport_api_cmd_send_simple.c b/src/transport/transport_api_cmd_send_simple.c
index 8d652563f..6c4b76f48 100644
--- a/src/transport/transport_api_cmd_send_simple.c
+++ b/src/transport/transport_api_cmd_send_simple.c
@@ -129,6 +129,7 @@ GNUNET_TRANSPORT_cmd_send_simple (const char *label,
sss->m = m;
sss->n = n;
sss->num = num;
+ sss->peer1_label = peer1_label;
struct GNUNET_TESTING_Command cmd = {
.cls = sss,