diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-12 14:02:01 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-04-12 14:02:01 +0000 |
commit | 69d570f81ce13fa8e15d02b11a4766cc6cf02e24 (patch) | |
tree | 8d1914a7020dbcf7c12538f74b4774c6bece2c19 /src/transport | |
parent | a4b18a0c200b70ad5c57219b3788d2082277f4bd (diff) | |
download | gnunet-69d570f81ce13fa8e15d02b11a4766cc6cf02e24.tar.gz gnunet-69d570f81ce13fa8e15d02b11a4766cc6cf02e24.zip |
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 3840f07bc..d7fa8ea66 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1107,18 +1107,18 @@ static void disconnect_neighbour (struct NeighbourList *n, int check); | |||
1107 | static void try_transmission_to_peer (struct NeighbourList *n); | 1107 | static void try_transmission_to_peer (struct NeighbourList *n); |
1108 | 1108 | ||
1109 | 1109 | ||
1110 | void ats_init (); | 1110 | static void ats_init (); |
1111 | 1111 | ||
1112 | void ats_shutdown ( ); | 1112 | static void ats_shutdown ( ); |
1113 | 1113 | ||
1114 | void ats_notify_peer_connect ( | 1114 | static void ats_notify_peer_connect ( |
1115 | const struct GNUNET_PeerIdentity *peer, | 1115 | const struct GNUNET_PeerIdentity *peer, |
1116 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data); | 1116 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data); |
1117 | 1117 | ||
1118 | void ats_notify_peer_disconnect ( | 1118 | static void ats_notify_peer_disconnect ( |
1119 | const struct GNUNET_PeerIdentity *peer); | 1119 | const struct GNUNET_PeerIdentity *peer); |
1120 | 1120 | ||
1121 | void ats_notify_ats_data ( | 1121 | static void ats_notify_ats_data ( |
1122 | const struct GNUNET_PeerIdentity *peer, | 1122 | const struct GNUNET_PeerIdentity *peer, |
1123 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data); | 1123 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data); |
1124 | 1124 | ||
@@ -5875,9 +5875,9 @@ return cont; | |||
5875 | } | 5875 | } |
5876 | #endif | 5876 | #endif |
5877 | 5877 | ||
5878 | #if HAVE_LIBGLPK | ||
5878 | static void ats_solve_problem (unsigned int max_it, unsigned int max_dur, unsigned int c_peers, unsigned int c_mechs, struct ATS_result *res) | 5879 | static void ats_solve_problem (unsigned int max_it, unsigned int max_dur, unsigned int c_peers, unsigned int c_mechs, struct ATS_result *res) |
5879 | { | 5880 | { |
5880 | #if HAVE_LIBGLPK | ||
5881 | int result; | 5881 | int result; |
5882 | int solution; | 5882 | int solution; |
5883 | 5883 | ||
@@ -5975,10 +5975,11 @@ static void ats_solve_problem (unsigned int max_it, unsigned int max_dur, unsig | |||
5975 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s %f\n", glp_get_col_name(prob,2*c_mechs+2), glp_get_col_prim(prob,2*c_mechs+2)); | 5975 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s %f\n", glp_get_col_name(prob,2*c_mechs+2), glp_get_col_prim(prob,2*c_mechs+2)); |
5976 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s %f\n", glp_get_col_name(prob,2*c_mechs+3), glp_get_col_prim(prob,2*c_mechs+3)); | 5976 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s %f\n", glp_get_col_name(prob,2*c_mechs+3), glp_get_col_prim(prob,2*c_mechs+3)); |
5977 | #endif | 5977 | #endif |
5978 | } | ||
5978 | #endif | 5979 | #endif |
5979 | 5980 | ||
5980 | } | ||
5981 | 5981 | ||
5982 | #if HAVE_LIBGLPK | ||
5982 | /** solve the bandwidth distribution problem | 5983 | /** solve the bandwidth distribution problem |
5983 | * @param max_it maximum iterations | 5984 | * @param max_it maximum iterations |
5984 | * @param max_dur maximum duration in ms | 5985 | * @param max_dur maximum duration in ms |
@@ -6438,6 +6439,7 @@ static int ats_create_problem (double D, double U, double R, int v_b_min, int v_ | |||
6438 | return GNUNET_OK; | 6439 | return GNUNET_OK; |
6439 | #endif | 6440 | #endif |
6440 | } | 6441 | } |
6442 | #endif | ||
6441 | 6443 | ||
6442 | void ats_calculate_bandwidth_distribution () | 6444 | void ats_calculate_bandwidth_distribution () |
6443 | { | 6445 | { |
@@ -6524,7 +6526,7 @@ void ats_calculate_bandwidth_distribution () | |||
6524 | 6526 | ||
6525 | 6527 | ||
6526 | 6528 | ||
6527 | void | 6529 | static void |
6528 | ats_schedule_calculation (void *cls, | 6530 | ats_schedule_calculation (void *cls, |
6529 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 6531 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
6530 | { | 6532 | { |
@@ -6612,7 +6614,7 @@ void ats_init () | |||
6612 | } | 6614 | } |
6613 | 6615 | ||
6614 | 6616 | ||
6615 | void ats_shutdown () | 6617 | static void ats_shutdown () |
6616 | { | 6618 | { |
6617 | #if DEBUG_ATS | 6619 | #if DEBUG_ATS |
6618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ats_destroy\n"); | 6620 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "ats_destroy\n"); |
@@ -6664,7 +6666,7 @@ void ats_notify_peer_disconnect ( | |||
6664 | ats_calculate_bandwidth_distribution (ats); | 6666 | ats_calculate_bandwidth_distribution (ats); |
6665 | } | 6667 | } |
6666 | 6668 | ||
6667 | 6669 | #if HAVE_LIBGLPK | |
6668 | void ats_notify_ats_data ( | 6670 | void ats_notify_ats_data ( |
6669 | const struct GNUNET_PeerIdentity *peer, | 6671 | const struct GNUNET_PeerIdentity *peer, |
6670 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data) | 6672 | const struct GNUNET_TRANSPORT_ATS_Information *ats_data) |
@@ -6674,6 +6676,7 @@ void ats_notify_ats_data ( | |||
6674 | #endif | 6676 | #endif |
6675 | ats_calculate_bandwidth_distribution(ats); | 6677 | ats_calculate_bandwidth_distribution(ats); |
6676 | } | 6678 | } |
6679 | #endif | ||
6677 | 6680 | ||
6678 | struct ForeignAddressList * ats_get_preferred_address ( | 6681 | struct ForeignAddressList * ats_get_preferred_address ( |
6679 | struct NeighbourList *n) | 6682 | struct NeighbourList *n) |