aboutsummaryrefslogtreecommitdiff
path: root/src/transport/test_transport_api_manipulation_send_tcp.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-02-05 15:50:33 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-02-05 15:50:33 +0000
commitbd5e9a8250e9f1d30a8a8c772a84307ff0eb7fb2 (patch)
treefcbd95e4c2f6e229e3dafa16d4a846b2dd8b4d9d /src/transport/test_transport_api_manipulation_send_tcp.c
parent9ea6140052f8340045bf0b363030a1e6ab79a435 (diff)
downloadgnunet-bd5e9a8250e9f1d30a8a8c772a84307ff0eb7fb2.tar.gz
gnunet-bd5e9a8250e9f1d30a8a8c772a84307ff0eb7fb2.zip
fixes
Diffstat (limited to 'src/transport/test_transport_api_manipulation_send_tcp.c')
-rw-r--r--src/transport/test_transport_api_manipulation_send_tcp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/test_transport_api_manipulation_send_tcp.c b/src/transport/test_transport_api_manipulation_send_tcp.c
index cdef9921b..6e8489e6e 100644
--- a/src/transport/test_transport_api_manipulation_send_tcp.c
+++ b/src/transport/test_transport_api_manipulation_send_tcp.c
@@ -176,7 +176,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
176 176
177 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id)); 177 char *ps = GNUNET_strdup (GNUNET_i2s (&p->id));
178 178
179 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 179 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
180 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n", 180 "Peer %u (`%4s') received message of type %d and size %u size from peer %u (`%4s')!\n",
181 p->no, ps, ntohs (message->type), ntohs (message->size), t->no, 181 p->no, ps, ntohs (message->type), ntohs (message->size), t->no,
182 GNUNET_i2s (&t->id)); 182 GNUNET_i2s (&t->id));
@@ -210,7 +210,7 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
210 { 210 {
211 /* Received manipulated message */ 211 /* Received manipulated message */
212 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed); 212 dur_delayed = GNUNET_TIME_absolute_get_duration(start_delayed);
213 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 213 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
214 "Received delayed message %u after %llu\n", 214 "Received delayed message %u after %llu\n",
215 messages_recv, 215 messages_recv,
216 (long long unsigned int) dur_delayed.rel_value); 216 (long long unsigned int) dur_delayed.rel_value);
@@ -284,7 +284,7 @@ notify_ready (void *cls, size_t size, void *buf)
284static void 284static void
285sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 285sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
286{ 286{
287 struct GNUNET_ATS_Information ats[2]; 287 struct GNUNET_ATS_Information ats[1];
288 send_task = GNUNET_SCHEDULER_NO_TASK; 288 send_task = GNUNET_SCHEDULER_NO_TASK;
289 289
290 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0) 290 if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
@@ -305,10 +305,10 @@ sendtask (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
305 { 305 {
306 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY); 306 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DELAY);
307 ats[0].value = htonl (1000); 307 ats[0].value = htonl (1000);
308 ats[1].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE); 308 GNUNET_TRANSPORT_set_traffic_metric (p2->th, &p1->id, TM_SEND, ats, 1);
309 ats[1].value = htonl (10); 309 ats[0].type = htonl (GNUNET_ATS_QUALITY_NET_DISTANCE);
310 310 ats[0].value = htonl (10);
311 GNUNET_TRANSPORT_set_traffic_metric (p2->th, &p1->id, TM_SEND, ats, 2); 311 GNUNET_TRANSPORT_set_traffic_metric (p1->th, &p2->id, TM_BOTH, ats, 1);
312 312
313 start_delayed = GNUNET_TIME_absolute_get(); 313 start_delayed = GNUNET_TIME_absolute_get();
314 } 314 }