diff options
author | t3sserakt <t3ss@posteo.de> | 2021-08-04 15:09:17 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2021-08-04 15:09:17 +0200 |
commit | 873381c653bbd96f376f8fa028fc49b5ec4fc721 (patch) | |
tree | f6072a5d222574528fb2ffe83ca5c5a30499f187 /src | |
parent | 22b6c43bb3508c0448f232429c86583ef09a991c (diff) | |
download | gnunet-873381c653bbd96f376f8fa028fc49b5ec4fc721.tar.gz gnunet-873381c653bbd96f376f8fa028fc49b5ec4fc721.zip |
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.h | 2 | ||||
-rw-r--r-- | src/testbed/testbed_api_cmd_netjail_start_testbed.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-communicator-tcp.c | 2 | ||||
-rw-r--r-- | src/transport/transport_api_cmd_connecting_peers.c | 12 | ||||
-rw-r--r-- | src/transport/transport_api_cmd_send_simple.c | 1 |
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 @@ | |||
40 | /** | 40 | /** |
41 | * Cmds Helper binary name | 41 | * Cmds Helper binary name |
42 | */ | 42 | */ |
43 | #define HELPER_CMDS_BINARY "./../testbed/gnunet-cmds-helper" | 43 | #define HELPER_CMDS_BINARY "gnunet-cmds-helper" |
44 | 44 | ||
45 | 45 | ||
46 | /** | 46 | /** |
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 | |||
328 | char *const script_argv[] = {NETJAIL_EXEC_SCRIPT, | 328 | char *const script_argv[] = {NETJAIL_EXEC_SCRIPT, |
329 | m_char, | 329 | m_char, |
330 | n_char, | 330 | n_char, |
331 | HELPER_CMDS_BINARY, | 331 | GNUNET_OS_get_libexec_binary_path(HELPER_CMDS_BINARY), |
332 | ns->global_n, | 332 | ns->global_n, |
333 | ns->local_m, | 333 | ns->local_m, |
334 | NULL}; | 334 | 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) | |||
2710 | { | 2710 | { |
2711 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 2711 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
2712 | "Invalid TCP KX received from %s\n", | 2712 | "Invalid TCP KX received from %s\n", |
2713 | GNUNET_a2s (queue->address, queue->address_len)); | 2713 | GNUNET_a2s (pq->address, pq->address_len)); |
2714 | gcry_cipher_close (queue->in_cipher); | 2714 | gcry_cipher_close (queue->in_cipher); |
2715 | GNUNET_free (queue); | 2715 | GNUNET_free (queue); |
2716 | free_proto_queue (pq); | 2716 | 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, | |||
62 | //size_t *hello_size; | 62 | //size_t *hello_size; |
63 | enum GNUNET_NetworkType nt = 0; | 63 | enum GNUNET_NetworkType nt = 0; |
64 | char *peer_id; | 64 | char *peer_id; |
65 | struct GNUNET_PeerIdentity *id; | ||
65 | 66 | ||
66 | peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label); | 67 | peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label); |
67 | GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd, | 68 | GNUNET_TRANSPORT_get_trait_application_handle (peer1_cmd, |
@@ -74,21 +75,21 @@ connect_peers_run (void *cls, | |||
74 | "hello: %s\n", | 75 | "hello: %s\n", |
75 | hello); | 76 | hello); |
76 | 77 | ||
77 | /*GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd, | 78 | GNUNET_TRANSPORT_get_trait_peer_id (peer1_cmd, |
78 | &id); | 79 | &id); |
79 | LOG (GNUNET_ERROR_TYPE_ERROR, | 80 | LOG (GNUNET_ERROR_TYPE_ERROR, |
80 | "pid %s\n", | 81 | "pid %s\n", |
81 | GNUNET_i2s_full(id));*/ | 82 | GNUNET_i2s_full(id)); |
82 | 83 | ||
83 | if(strstr(hello, "60002") != NULL) | 84 | if(strstr(hello, "60002") != NULL) |
84 | { | 85 | { |
85 | addr = "tcp-192.168.15.2:60003"; | 86 | addr = "tcp-192.168.15.2:60003"; |
86 | peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730"; | 87 | peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG"; |
87 | } | 88 | } |
88 | else | 89 | else |
89 | { | 90 | { |
90 | addr = "tcp-192.168.15.1:60002"; | 91 | addr = "tcp-192.168.15.1:60002"; |
91 | peer_id = "F2F3X9G1YNCTXKK7A4J6M4ZM4BBSKC9DEXZVHCWQ475M0C7PNWCG"; | 92 | peer_id = "4TTC9WBSVP9RJT6DVEZ7E0TDW7TQXC11NR1EMR2F8ARS87WZ2730"; |
92 | } | 93 | } |
93 | 94 | ||
94 | LOG (GNUNET_ERROR_TYPE_ERROR, | 95 | LOG (GNUNET_ERROR_TYPE_ERROR, |
@@ -139,6 +140,9 @@ connect_peers_finish (void *cls, | |||
139 | struct GNUNET_HashCode hc; | 140 | struct GNUNET_HashCode hc; |
140 | int node_number; | 141 | int node_number; |
141 | 142 | ||
143 | LOG (GNUNET_ERROR_TYPE_ERROR, | ||
144 | "Connect finished?\n"); | ||
145 | |||
142 | peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label); | 146 | peer1_cmd = GNUNET_TESTING_interpreter_lookup_command (cps->peer1_label); |
143 | GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, | 147 | GNUNET_TRANSPORT_get_trait_connected_peers_map (peer1_cmd, |
144 | &connected_peers_map); | 148 | &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, | |||
129 | sss->m = m; | 129 | sss->m = m; |
130 | sss->n = n; | 130 | sss->n = n; |
131 | sss->num = num; | 131 | sss->num = num; |
132 | sss->peer1_label = peer1_label; | ||
132 | 133 | ||
133 | struct GNUNET_TESTING_Command cmd = { | 134 | struct GNUNET_TESTING_Command cmd = { |
134 | .cls = sss, | 135 | .cls = sss, |