diff options
Diffstat (limited to 'src/core/test_core_api.c')
-rw-r--r-- | src/core/test_core_api.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index 129184587..b41d30450 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -38,11 +38,6 @@ | |||
38 | 38 | ||
39 | #define START_ARM GNUNET_YES | 39 | #define START_ARM GNUNET_YES |
40 | 40 | ||
41 | /** | ||
42 | * How long until we give up on transmitting the message? | ||
43 | */ | ||
44 | #define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) | ||
45 | |||
46 | #define MTYPE 12345 | 41 | #define MTYPE 12345 |
47 | 42 | ||
48 | struct PeerContext | 43 | struct PeerContext |
@@ -103,8 +98,7 @@ terminate_task_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
103 | static void | 98 | static void |
104 | connect_notify (void *cls, | 99 | connect_notify (void *cls, |
105 | const struct GNUNET_PeerIdentity *peer, | 100 | const struct GNUNET_PeerIdentity *peer, |
106 | struct GNUNET_TIME_Relative latency, | 101 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) |
107 | uint32_t distance) | ||
108 | { | 102 | { |
109 | struct PeerContext *pc = cls; | 103 | struct PeerContext *pc = cls; |
110 | GNUNET_assert (pc->connect_status == 0); | 104 | GNUNET_assert (pc->connect_status == 0); |
@@ -130,8 +124,7 @@ static int | |||
130 | inbound_notify (void *cls, | 124 | inbound_notify (void *cls, |
131 | const struct GNUNET_PeerIdentity *other, | 125 | const struct GNUNET_PeerIdentity *other, |
132 | const struct GNUNET_MessageHeader *message, | 126 | const struct GNUNET_MessageHeader *message, |
133 | struct GNUNET_TIME_Relative latency, | 127 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) |
134 | uint32_t distance) | ||
135 | { | 128 | { |
136 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 129 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
137 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); | 130 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); |
@@ -143,8 +136,7 @@ static int | |||
143 | outbound_notify (void *cls, | 136 | outbound_notify (void *cls, |
144 | const struct GNUNET_PeerIdentity *other, | 137 | const struct GNUNET_PeerIdentity *other, |
145 | const struct GNUNET_MessageHeader *message, | 138 | const struct GNUNET_MessageHeader *message, |
146 | struct GNUNET_TIME_Relative latency, | 139 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) |
147 | uint32_t distance) | ||
148 | { | 140 | { |
149 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 141 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
150 | "Core notifies about outbound data for `%4s'.\n", | 142 | "Core notifies about outbound data for `%4s'.\n", |
@@ -160,8 +152,7 @@ static int | |||
160 | process_mtype (void *cls, | 152 | process_mtype (void *cls, |
161 | const struct GNUNET_PeerIdentity *peer, | 153 | const struct GNUNET_PeerIdentity *peer, |
162 | const struct GNUNET_MessageHeader *message, | 154 | const struct GNUNET_MessageHeader *message, |
163 | struct GNUNET_TIME_Relative latency, | 155 | const struct GNUNET_TRANSPORT_ATS_Information *atsi) |
164 | uint32_t distance) | ||
165 | { | 156 | { |
166 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 157 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
167 | "Receiving message from `%4s'.\n", GNUNET_i2s (peer)); | 158 | "Receiving message from `%4s'.\n", GNUNET_i2s (peer)); |
@@ -220,7 +211,6 @@ init_notify (void *cls, | |||
220 | OKPP; | 211 | OKPP; |
221 | /* connect p2 */ | 212 | /* connect p2 */ |
222 | GNUNET_CORE_connect (p2.cfg, 1, | 213 | GNUNET_CORE_connect (p2.cfg, 1, |
223 | TIMEOUT, | ||
224 | &p2, | 214 | &p2, |
225 | &init_notify, | 215 | &init_notify, |
226 | &connect_notify, | 216 | &connect_notify, |
@@ -311,7 +301,6 @@ run (void *cls, | |||
311 | setup_peer (&p1, "test_core_api_peer1.conf"); | 301 | setup_peer (&p1, "test_core_api_peer1.conf"); |
312 | setup_peer (&p2, "test_core_api_peer2.conf"); | 302 | setup_peer (&p2, "test_core_api_peer2.conf"); |
313 | GNUNET_CORE_connect (p1.cfg, 1, | 303 | GNUNET_CORE_connect (p1.cfg, 1, |
314 | TIMEOUT, | ||
315 | &p1, | 304 | &p1, |
316 | &init_notify, | 305 | &init_notify, |
317 | &connect_notify, | 306 | &connect_notify, |