diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-10 11:42:21 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-10 11:42:21 +0000 |
commit | 2ac8943f5d703fcf886b16fbf2eb6be3fedb746f (patch) | |
tree | ffd95eb4e54d8d86dabe5494bcadb3d293a94060 /src/transport | |
parent | a9a66ad11e24a354a323da4e82001323f7470aee (diff) | |
download | gnunet-2ac8943f5d703fcf886b16fbf2eb6be3fedb746f.tar.gz gnunet-2ac8943f5d703fcf886b16fbf2eb6be3fedb746f.zip |
fixed notification order
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index e16a71249..0957a0ce1 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -737,10 +737,15 @@ try_connect_using_address (void *cls, const struct GNUNET_PeerIdentity *target, | |||
737 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting inbound quota of %u for peer `%s' to \n", | 737 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Setting inbound quota of %u for peer `%s' to \n", |
738 | ntohl (bandwidth_in), GNUNET_i2s (target)); | 738 | ntohl (bandwidth_in), GNUNET_i2s (target)); |
739 | #endif | 739 | #endif |
740 | GST_neighbours_set_incoming_quota (&n->id, bandwidth_in); | ||
740 | 741 | ||
742 | /* First tell clients about connected neighbours...*/ | ||
743 | neighbours_connected++; | ||
744 | GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1, | ||
745 | GNUNET_NO); | ||
746 | connect_notify_cb (callback_cls, target, n->ats, n->ats_count); | ||
741 | 747 | ||
742 | GST_neighbours_set_incoming_quota (&n->id, bandwidth_in); | 748 | /* ... then send outbound quota for this peer to all clients */ |
743 | /* ATS told us outbound quota for this peer, tell all clients */ | ||
744 | #if DEBUG_TRANSPORT | 749 | #if DEBUG_TRANSPORT |
745 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending outbound quota of %u Bps for peer `%s' to all clients\n", | 750 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Sending outbound quota of %u Bps for peer `%s' to all clients\n", |
746 | ntohl (bandwidth_out), GNUNET_i2s (target)); | 751 | ntohl (bandwidth_out), GNUNET_i2s (target)); |
@@ -753,10 +758,6 @@ try_connect_using_address (void *cls, const struct GNUNET_PeerIdentity *target, | |||
753 | msg.peer = (*target); | 758 | msg.peer = (*target); |
754 | GST_clients_broadcast ((struct GNUNET_MessageHeader *) &msg, GNUNET_NO); | 759 | GST_clients_broadcast ((struct GNUNET_MessageHeader *) &msg, GNUNET_NO); |
755 | 760 | ||
756 | neighbours_connected++; | ||
757 | GNUNET_STATISTICS_update (GST_stats, gettext_noop ("# peers connected"), 1, | ||
758 | GNUNET_NO); | ||
759 | connect_notify_cb (callback_cls, target, n->ats, n->ats_count); | ||
760 | } | 761 | } |
761 | 762 | ||
762 | 763 | ||