aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-10-18 07:32:47 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-10-18 07:32:47 +0000
commit17c67202c45d98da06baa3739c82e20dcd045d05 (patch)
tree412c6b4af7f1ab5ae65a466a21094e7cdb22d6f5 /src
parent3e56060cdd1e45b38de80cead264e14077665e2e (diff)
downloadgnunet-17c67202c45d98da06baa3739c82e20dcd045d05.tar.gz
gnunet-17c67202c45d98da06baa3739c82e20dcd045d05.zip
- fix assertion in scheduling
- formatting
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c29
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c2
2 files changed, 17 insertions, 14 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 8f830bd9c..749f94503 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -461,22 +461,25 @@ GST_ats_update_metrics (const struct GNUNET_PeerIdentity *peer,
461 struct GNUNET_ATS_Information *ats_new; 461 struct GNUNET_ATS_Information *ats_new;
462 462
463 if (GNUNET_NO == GNUNET_ATS_session_known (GST_ats, address, session)) 463 if (GNUNET_NO == GNUNET_ATS_session_known (GST_ats, address, session))
464 return; 464 return;
465 465
466 /* Call to manipulation to manipulate ATS information */ 466 /* Call to manipulation to manipulate ATS information */
467 ats_new = GST_manipulation_manipulate_metrics (peer, address, session, ats, ats_count); 467 ats_new = GST_manipulation_manipulate_metrics (peer, address, session, ats,
468 if (NULL == ats_new) 468 ats_count);
469 { 469 if (NULL == ats_new)
470 GNUNET_break (0); 470 {
471 return; 471 GNUNET_break(0);
472 } 472 return;
473 if (GNUNET_NO == GNUNET_ATS_address_update (GST_ats, address, session, ats_new, ats_count)) 473 }
474 if (GNUNET_NO == GNUNET_ATS_address_update (GST_ats,
475 address, session, ats_new, ats_count))
474 { 476 {
475 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 477 GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
476 _("Address or session unknown: failed to update properties for peer `%s' plugin `%s' address `%s' session %p\n"), 478 _("Address or session unknown: failed to update properties for peer `%s' plugin `%s' address `%s' session %p\n"),
477 GNUNET_i2s (peer), address->transport_name, GST_plugins_a2s (address), session); 479 GNUNET_i2s (peer), address->transport_name, GST_plugins_a2s (address),
480 session);
478 } 481 }
479 GNUNET_free (ats_new); 482 GNUNET_free(ats_new);
480} 483}
481 484
482 485
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index c10d6ccfd..dd598859f 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -2567,7 +2567,7 @@ util_it (void *cls,
2567 atsi[0].value = htonl (bps_out); 2567 atsi[0].value = htonl (bps_out);
2568 atsi[1].type = htonl (GNUNET_ATS_UTILIZATION_DOWN); 2568 atsi[1].type = htonl (GNUNET_ATS_UTILIZATION_DOWN);
2569 atsi[1].value = htonl (bps_in); 2569 atsi[1].value = htonl (bps_in);
2570 GNUNET_ATS_address_update (GST_ats, n->primary_address.address, 2570 GST_ats_update_metrics (key, n->primary_address.address,
2571 n->primary_address.session, atsi, 2); 2571 n->primary_address.session, atsi, 2);
2572 n->util_bytes_recv = 0; 2572 n->util_bytes_recv = 0;
2573 n->util_bytes_sent = 0; 2573 n->util_bytes_sent = 0;