diff options
-rw-r--r-- | src/ats/gnunet-ats-solver-eval.c | 4 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats.c | 8 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_feedback.c | 4 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_feedback.h | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_normalization.c | 6 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_normalization.h | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_plugins.c | 35 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_plugins.h | 30 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_preferences.c | 8 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_preferences.h | 4 | ||||
-rw-r--r-- | src/ats/perf_ats_solver.c | 2 | ||||
-rw-r--r-- | src/ats/plugin_ats_mlp.c | 6 | ||||
-rw-r--r-- | src/ats/plugin_ats_proportional.c | 56 | ||||
-rw-r--r-- | src/ats/plugin_ats_ril.c | 6 |
15 files changed, 89 insertions, 86 deletions
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c index e1340580e..19c935fbb 100644 --- a/src/ats/gnunet-ats-solver-eval.c +++ b/src/ats/gnunet-ats-solver-eval.c | |||
@@ -639,7 +639,7 @@ set_prop_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
639 | pg->ats_property, prop_value, prop_value); | 639 | pg->ats_property, prop_value, prop_value); |
640 | } | 640 | } |
641 | else | 641 | else |
642 | GAS_normalization_normalize_property (pg->test_address->ats_addr, &atsi, 1); | 642 | GAS_normalization_update_property (pg->test_address->ats_addr, &atsi, 1); |
643 | sh->sf->s_bulk_stop (sh->sf->cls); | 643 | sh->sf->s_bulk_stop (sh->sf->cls); |
644 | 644 | ||
645 | pg->set_task = GNUNET_SCHEDULER_add_delayed (pg->frequency, | 645 | pg->set_task = GNUNET_SCHEDULER_add_delayed (pg->frequency, |
@@ -3010,7 +3010,7 @@ get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id) | |||
3010 | return p->pref_abs; | 3010 | return p->pref_abs; |
3011 | } | 3011 | } |
3012 | else | 3012 | else |
3013 | return GAS_normalization_get_preferences_by_peer (NULL, | 3013 | return GAS_preference_get_by_peer (NULL, |
3014 | id); | 3014 | id); |
3015 | } | 3015 | } |
3016 | 3016 | ||
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c index 4454c59ea..ea8bb45ad 100644 --- a/src/ats/gnunet-service-ats.c +++ b/src/ats/gnunet-service-ats.c | |||
@@ -111,7 +111,7 @@ client_disconnect_handler (void *cls, | |||
111 | return; | 111 | return; |
112 | GAS_scheduling_remove_client (client); | 112 | GAS_scheduling_remove_client (client); |
113 | GAS_connectivity_remove_client (client); | 113 | GAS_connectivity_remove_client (client); |
114 | GAS_normalization_preference_client_disconnect (client); | 114 | GAS_preference_client_disconnect (client); |
115 | } | 115 | } |
116 | 116 | ||
117 | 117 | ||
@@ -127,7 +127,7 @@ cleanup_task (void *cls, | |||
127 | { | 127 | { |
128 | GAS_addresses_done (); | 128 | GAS_addresses_done (); |
129 | GAS_connectivity_done (); | 129 | GAS_connectivity_done (); |
130 | GAS_plugins_done (); | 130 | GAS_plugin_done (); |
131 | GAS_normalization_stop (); | 131 | GAS_normalization_stop (); |
132 | GAS_scheduling_done (); | 132 | GAS_scheduling_done (); |
133 | GAS_performance_done (); | 133 | GAS_performance_done (); |
@@ -181,7 +181,7 @@ run (void *cls, | |||
181 | sizeof (struct ReservationRequestMessage)}, | 181 | sizeof (struct ReservationRequestMessage)}, |
182 | {&GAS_handle_preference_change, NULL, | 182 | {&GAS_handle_preference_change, NULL, |
183 | GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE, 0}, | 183 | GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE, 0}, |
184 | {&GAS_handle_preference_feedback, NULL, | 184 | {&GAS_handle_feedback, NULL, |
185 | GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK, 0}, | 185 | GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_FEEDBACK, 0}, |
186 | {NULL, NULL, 0, 0} | 186 | {NULL, NULL, 0, 0} |
187 | }; | 187 | }; |
@@ -193,7 +193,7 @@ run (void *cls, | |||
193 | GAS_normalization_start (); | 193 | GAS_normalization_start (); |
194 | GAS_addresses_init (server); | 194 | GAS_addresses_init (server); |
195 | if (GNUNET_OK != | 195 | if (GNUNET_OK != |
196 | GAS_plugins_init (cfg)) | 196 | GAS_plugin_init (cfg)) |
197 | { | 197 | { |
198 | GNUNET_break (0); | 198 | GNUNET_break (0); |
199 | GAS_addresses_done (); | 199 | GAS_addresses_done (); |
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index 0a35570c7..743c19436 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -646,7 +646,7 @@ GAS_addresses_update (const struct GNUNET_PeerIdentity *peer, | |||
646 | GNUNET_BANDWIDTH_value_init (aa->assigned_bw_out), | 646 | GNUNET_BANDWIDTH_value_init (aa->assigned_bw_out), |
647 | GNUNET_BANDWIDTH_value_init (aa->assigned_bw_in)); | 647 | GNUNET_BANDWIDTH_value_init (aa->assigned_bw_in)); |
648 | 648 | ||
649 | GAS_normalization_normalize_property (aa, | 649 | GAS_normalization_update_property (aa, |
650 | atsi, | 650 | atsi, |
651 | atsi_count); | 651 | atsi_count); |
652 | } | 652 | } |
diff --git a/src/ats/gnunet-service-ats_feedback.c b/src/ats/gnunet-service-ats_feedback.c index e367af92c..0ffb43e13 100644 --- a/src/ats/gnunet-service-ats_feedback.c +++ b/src/ats/gnunet-service-ats_feedback.c | |||
@@ -48,7 +48,7 @@ preference_feedback (struct GNUNET_SERVER_Client *application, | |||
48 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 48 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
49 | "Received PREFERENCE FEEDBACK for peer `%s'\n", | 49 | "Received PREFERENCE FEEDBACK for peer `%s'\n", |
50 | GNUNET_i2s (peer)); | 50 | GNUNET_i2s (peer)); |
51 | GAS_plugin_preference_feedback (application, | 51 | GAS_plugin_notify_feedback (application, |
52 | peer, | 52 | peer, |
53 | scope, | 53 | scope, |
54 | kind, | 54 | kind, |
@@ -64,7 +64,7 @@ preference_feedback (struct GNUNET_SERVER_Client *application, | |||
64 | * @param message the request message | 64 | * @param message the request message |
65 | */ | 65 | */ |
66 | void | 66 | void |
67 | GAS_handle_preference_feedback (void *cls, | 67 | GAS_handle_feedback (void *cls, |
68 | struct GNUNET_SERVER_Client *client, | 68 | struct GNUNET_SERVER_Client *client, |
69 | const struct GNUNET_MessageHeader *message) | 69 | const struct GNUNET_MessageHeader *message) |
70 | { | 70 | { |
diff --git a/src/ats/gnunet-service-ats_feedback.h b/src/ats/gnunet-service-ats_feedback.h index 4d34f616c..6cd133885 100644 --- a/src/ats/gnunet-service-ats_feedback.h +++ b/src/ats/gnunet-service-ats_feedback.h | |||
@@ -36,7 +36,7 @@ | |||
36 | * @param message the request message | 36 | * @param message the request message |
37 | */ | 37 | */ |
38 | void | 38 | void |
39 | GAS_handle_preference_feedback (void *cls, | 39 | GAS_handle_feedback (void *cls, |
40 | struct GNUNET_SERVER_Client *client, | 40 | struct GNUNET_SERVER_Client *client, |
41 | const struct GNUNET_MessageHeader *message); | 41 | const struct GNUNET_MessageHeader *message); |
42 | 42 | ||
diff --git a/src/ats/gnunet-service-ats_normalization.c b/src/ats/gnunet-service-ats_normalization.c index b3d8eba3f..936f8ca34 100644 --- a/src/ats/gnunet-service-ats_normalization.c +++ b/src/ats/gnunet-service-ats_normalization.c | |||
@@ -23,8 +23,6 @@ | |||
23 | * @brief ats service address: management of ATS properties and preferences normalization | 23 | * @brief ats service address: management of ATS properties and preferences normalization |
24 | * @author Matthias Wachs | 24 | * @author Matthias Wachs |
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | * | ||
27 | * FIXME: rename to 'properties'!? merge with addresses!? | ||
28 | */ | 26 | */ |
29 | #include "platform.h" | 27 | #include "platform.h" |
30 | #include <float.h> | 28 | #include <float.h> |
@@ -221,7 +219,7 @@ notify_change (void *cls, | |||
221 | struct Property *p = cls; | 219 | struct Property *p = cls; |
222 | struct ATS_Address *address = value; | 220 | struct ATS_Address *address = value; |
223 | 221 | ||
224 | GAS_normalized_property_changed (address, | 222 | GAS_plugin_notify_property_changed (address, |
225 | p->atsi_type, | 223 | p->atsi_type, |
226 | address->atsin[p->prop_type].norm); | 224 | address->atsin[p->prop_type].norm); |
227 | return GNUNET_OK; | 225 | return GNUNET_OK; |
@@ -236,7 +234,7 @@ notify_change (void *cls, | |||
236 | * @param atsi_count the number of atsi information in the array | 234 | * @param atsi_count the number of atsi information in the array |
237 | */ | 235 | */ |
238 | void | 236 | void |
239 | GAS_normalization_normalize_property (struct ATS_Address *address, | 237 | GAS_normalization_update_property (struct ATS_Address *address, |
240 | const struct GNUNET_ATS_Information *atsi, | 238 | const struct GNUNET_ATS_Information *atsi, |
241 | uint32_t atsi_count) | 239 | uint32_t atsi_count) |
242 | { | 240 | { |
diff --git a/src/ats/gnunet-service-ats_normalization.h b/src/ats/gnunet-service-ats_normalization.h index add02ba42..614824d09 100644 --- a/src/ats/gnunet-service-ats_normalization.h +++ b/src/ats/gnunet-service-ats_normalization.h | |||
@@ -42,7 +42,7 @@ | |||
42 | * @param atsi_count the number of atsi information in the array | 42 | * @param atsi_count the number of atsi information in the array |
43 | */ | 43 | */ |
44 | void | 44 | void |
45 | GAS_normalization_normalize_property (struct ATS_Address *address, | 45 | GAS_normalization_update_property (struct ATS_Address *address, |
46 | const struct GNUNET_ATS_Information *atsi, | 46 | const struct GNUNET_ATS_Information *atsi, |
47 | uint32_t atsi_count); | 47 | uint32_t atsi_count); |
48 | 48 | ||
diff --git a/src/ats/gnunet-service-ats_plugins.c b/src/ats/gnunet-service-ats_plugins.c index 8448e4c4e..b44934999 100644 --- a/src/ats/gnunet-service-ats_plugins.c +++ b/src/ats/gnunet-service-ats_plugins.c | |||
@@ -58,9 +58,9 @@ static char *plugin; | |||
58 | * @param pref_rel the new relative preference value | 58 | * @param pref_rel the new relative preference value |
59 | */ | 59 | */ |
60 | void | 60 | void |
61 | GAS_normalized_preference_changed (const struct GNUNET_PeerIdentity *peer, | 61 | GAS_plugin_notify_preference_changed (const struct GNUNET_PeerIdentity *peer, |
62 | enum GNUNET_ATS_PreferenceKind kind, | 62 | enum GNUNET_ATS_PreferenceKind kind, |
63 | double pref_rel) | 63 | double pref_rel) |
64 | { | 64 | { |
65 | sf->s_pref (sf->cls, | 65 | sf->s_pref (sf->cls, |
66 | peer, | 66 | peer, |
@@ -77,15 +77,10 @@ GAS_normalized_preference_changed (const struct GNUNET_PeerIdentity *peer, | |||
77 | * @param prop_rel the new relative preference value | 77 | * @param prop_rel the new relative preference value |
78 | */ | 78 | */ |
79 | void | 79 | void |
80 | GAS_normalized_property_changed (struct ATS_Address *address, | 80 | GAS_plugin_notify_property_changed (struct ATS_Address *address, |
81 | enum GNUNET_ATS_Property type, | 81 | enum GNUNET_ATS_Property type, |
82 | double prop_rel) | 82 | double prop_rel) |
83 | { | 83 | { |
84 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
85 | "Normalized property %s for peer `%s' changed to %.3f \n", | ||
86 | GNUNET_ATS_print_property_type (type), | ||
87 | GNUNET_i2s (&address->peer), | ||
88 | prop_rel); | ||
89 | sf->s_address_update_property (sf->cls, | 84 | sf->s_address_update_property (sf->cls, |
90 | address, | 85 | address, |
91 | type, | 86 | type, |
@@ -413,7 +408,7 @@ load_quotas (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
413 | * solver plugin) | 408 | * solver plugin) |
414 | */ | 409 | */ |
415 | int | 410 | int |
416 | GAS_plugins_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | 411 | GAS_plugin_init (const struct GNUNET_CONFIGURATION_Handle *cfg) |
417 | { | 412 | { |
418 | char *mode_str; | 413 | char *mode_str; |
419 | 414 | ||
@@ -431,7 +426,7 @@ GAS_plugins_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
431 | env.cls = NULL; | 426 | env.cls = NULL; |
432 | env.info_cb = &solver_info_cb; | 427 | env.info_cb = &solver_info_cb; |
433 | env.bandwidth_changed_cb = &bandwidth_changed_cb; | 428 | env.bandwidth_changed_cb = &bandwidth_changed_cb; |
434 | env.get_preferences = &GAS_normalization_get_preferences_by_peer; | 429 | env.get_preferences = &GAS_preference_get_by_peer; |
435 | env.cfg = cfg; | 430 | env.cfg = cfg; |
436 | env.stats = GSA_stats; | 431 | env.stats = GSA_stats; |
437 | env.addresses = GSA_addresses; | 432 | env.addresses = GSA_addresses; |
@@ -462,7 +457,7 @@ GAS_plugins_init (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
462 | * Shutdown address subsystem. | 457 | * Shutdown address subsystem. |
463 | */ | 458 | */ |
464 | void | 459 | void |
465 | GAS_plugins_done () | 460 | GAS_plugin_done () |
466 | { | 461 | { |
467 | GNUNET_PLUGIN_unload (plugin, | 462 | GNUNET_PLUGIN_unload (plugin, |
468 | sf); | 463 | sf); |
@@ -491,7 +486,7 @@ GAS_plugin_new_address (struct ATS_Address *new_address, | |||
491 | new_address, | 486 | new_address, |
492 | addr_net); | 487 | addr_net); |
493 | sf->s_bulk_start (sf->cls); | 488 | sf->s_bulk_start (sf->cls); |
494 | GAS_normalization_normalize_property (new_address, | 489 | GAS_normalization_update_property (new_address, |
495 | atsi, | 490 | atsi, |
496 | atsi_count); | 491 | atsi_count); |
497 | sf->s_bulk_stop (sf->cls); | 492 | sf->s_bulk_stop (sf->cls); |
@@ -524,11 +519,11 @@ GAS_plugin_delete_address (struct ATS_Address *address) | |||
524 | * @param score_abs degree of the appreciation | 519 | * @param score_abs degree of the appreciation |
525 | */ | 520 | */ |
526 | void | 521 | void |
527 | GAS_plugin_preference_feedback (struct GNUNET_SERVER_Client *application, | 522 | GAS_plugin_notify_feedback (struct GNUNET_SERVER_Client *application, |
528 | const struct GNUNET_PeerIdentity *peer, | 523 | const struct GNUNET_PeerIdentity *peer, |
529 | const struct GNUNET_TIME_Relative scope, | 524 | const struct GNUNET_TIME_Relative scope, |
530 | enum GNUNET_ATS_PreferenceKind kind, | 525 | enum GNUNET_ATS_PreferenceKind kind, |
531 | float score_abs) | 526 | float score_abs) |
532 | { | 527 | { |
533 | sf->s_feedback (sf->cls, | 528 | sf->s_feedback (sf->cls, |
534 | application, | 529 | application, |
diff --git a/src/ats/gnunet-service-ats_plugins.h b/src/ats/gnunet-service-ats_plugins.h index 09c4b36f6..b2567ac26 100644 --- a/src/ats/gnunet-service-ats_plugins.h +++ b/src/ats/gnunet-service-ats_plugins.h | |||
@@ -41,14 +41,14 @@ | |||
41 | * solver plugin) | 41 | * solver plugin) |
42 | */ | 42 | */ |
43 | int | 43 | int |
44 | GAS_plugins_init (const struct GNUNET_CONFIGURATION_Handle *cfg); | 44 | GAS_plugin_init (const struct GNUNET_CONFIGURATION_Handle *cfg); |
45 | 45 | ||
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Shutdown address subsystem. | 48 | * Shutdown address subsystem. |
49 | */ | 49 | */ |
50 | void | 50 | void |
51 | GAS_plugins_done (void); | 51 | GAS_plugin_done (void); |
52 | 52 | ||
53 | 53 | ||
54 | /** | 54 | /** |
@@ -59,9 +59,9 @@ GAS_plugins_done (void); | |||
59 | * @param pref_rel the new relative preference value | 59 | * @param pref_rel the new relative preference value |
60 | */ | 60 | */ |
61 | void | 61 | void |
62 | GAS_normalized_preference_changed (const struct GNUNET_PeerIdentity *peer, | 62 | GAS_plugin_notify_preference_changed (const struct GNUNET_PeerIdentity *peer, |
63 | enum GNUNET_ATS_PreferenceKind kind, | 63 | enum GNUNET_ATS_PreferenceKind kind, |
64 | double pref_rel); | 64 | double pref_rel); |
65 | 65 | ||
66 | 66 | ||
67 | /** | 67 | /** |
@@ -69,12 +69,12 @@ GAS_normalized_preference_changed (const struct GNUNET_PeerIdentity *peer, | |||
69 | * | 69 | * |
70 | * @param address the peer | 70 | * @param address the peer |
71 | * @param type the ATS type | 71 | * @param type the ATS type |
72 | * @param prop_rel the new relative preference value | 72 | * @param prop_rel the new relative property value |
73 | */ | 73 | */ |
74 | void | 74 | void |
75 | GAS_normalized_property_changed (struct ATS_Address *address, | 75 | GAS_plugin_notify_property_changed (struct ATS_Address *address, |
76 | enum GNUNET_ATS_Property type, | 76 | enum GNUNET_ATS_Property type, |
77 | double prop_rel); | 77 | double prop_rel); |
78 | 78 | ||
79 | 79 | ||
80 | /** | 80 | /** |
@@ -114,13 +114,11 @@ GAS_plugin_delete_address (struct ATS_Address *address); | |||
114 | * @param score_abs degree of the appreciation | 114 | * @param score_abs degree of the appreciation |
115 | */ | 115 | */ |
116 | void | 116 | void |
117 | GAS_plugin_preference_feedback (struct GNUNET_SERVER_Client *application, | 117 | GAS_plugin_notify_feedback (struct GNUNET_SERVER_Client *application, |
118 | const struct GNUNET_PeerIdentity *peer, | 118 | const struct GNUNET_PeerIdentity *peer, |
119 | const struct GNUNET_TIME_Relative scope, | 119 | const struct GNUNET_TIME_Relative scope, |
120 | enum GNUNET_ATS_PreferenceKind kind, | 120 | enum GNUNET_ATS_PreferenceKind kind, |
121 | float score_abs); | 121 | float score_abs); |
122 | |||
123 | |||
124 | 122 | ||
125 | 123 | ||
126 | /** | 124 | /** |
diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c index a4d0ae1f4..c26a71b5d 100644 --- a/src/ats/gnunet-service-ats_preferences.c +++ b/src/ats/gnunet-service-ats_preferences.c | |||
@@ -238,7 +238,7 @@ update_relative_values_for_peer (const struct GNUNET_PeerIdentity *id, | |||
238 | rp->f_rel[kind] = DEFAULT_REL_PREFERENCE; | 238 | rp->f_rel[kind] = DEFAULT_REL_PREFERENCE; |
239 | } | 239 | } |
240 | if (backup != rp->f_rel[kind]) | 240 | if (backup != rp->f_rel[kind]) |
241 | GAS_normalized_preference_changed (&rp->id, kind, | 241 | GAS_plugin_notify_preference_changed (&rp->id, kind, |
242 | rp->f_rel[kind]); | 242 | rp->f_rel[kind]); |
243 | } | 243 | } |
244 | } | 244 | } |
@@ -714,8 +714,8 @@ GAS_preference_done () | |||
714 | * default preferences if peer does not exist | 714 | * default preferences if peer does not exist |
715 | */ | 715 | */ |
716 | const double * | 716 | const double * |
717 | GAS_normalization_get_preferences_by_peer (void *cls, | 717 | GAS_preference_get_by_peer (void *cls, |
718 | const struct GNUNET_PeerIdentity *id) | 718 | const struct GNUNET_PeerIdentity *id) |
719 | { | 719 | { |
720 | struct PeerRelative *rp; | 720 | struct PeerRelative *rp; |
721 | 721 | ||
@@ -735,7 +735,7 @@ GAS_normalization_get_preferences_by_peer (void *cls, | |||
735 | * @param client the client | 735 | * @param client the client |
736 | */ | 736 | */ |
737 | void | 737 | void |
738 | GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client) | 738 | GAS_preference_client_disconnect (struct GNUNET_SERVER_Client *client) |
739 | { | 739 | { |
740 | struct PreferenceClient *c_cur; | 740 | struct PreferenceClient *c_cur; |
741 | 741 | ||
diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h index 67a1368a5..5425b73ff 100644 --- a/src/ats/gnunet-service-ats_preferences.h +++ b/src/ats/gnunet-service-ats_preferences.h | |||
@@ -74,7 +74,7 @@ GAS_preference_done (void); | |||
74 | * with GNUNET_ATS_PreferenceKind, NULL if peer does not exist | 74 | * with GNUNET_ATS_PreferenceKind, NULL if peer does not exist |
75 | */ | 75 | */ |
76 | const double * | 76 | const double * |
77 | GAS_normalization_get_preferences_by_peer (void *cls, | 77 | GAS_preference_get_by_peer (void *cls, |
78 | const struct GNUNET_PeerIdentity *id); | 78 | const struct GNUNET_PeerIdentity *id); |
79 | 79 | ||
80 | 80 | ||
@@ -84,7 +84,7 @@ GAS_normalization_get_preferences_by_peer (void *cls, | |||
84 | * @param client the disconnecting client | 84 | * @param client the disconnecting client |
85 | */ | 85 | */ |
86 | void | 86 | void |
87 | GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client); | 87 | GAS_preference_client_disconnect (struct GNUNET_SERVER_Client *client); |
88 | 88 | ||
89 | 89 | ||
90 | #endif | 90 | #endif |
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c index ef4c3ec5a..b7ddec503 100644 --- a/src/ats/perf_ats_solver.c +++ b/src/ats/perf_ats_solver.c | |||
@@ -418,7 +418,7 @@ bandwidth_changed_cb (void *cls, | |||
418 | static const double * | 418 | static const double * |
419 | get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id) | 419 | get_preferences_cb (void *cls, const struct GNUNET_PeerIdentity *id) |
420 | { | 420 | { |
421 | return GAS_normalization_get_preferences_by_peer (NULL, id); | 421 | return GAS_preference_get_by_peer (NULL, id); |
422 | } | 422 | } |
423 | 423 | ||
424 | 424 | ||
diff --git a/src/ats/plugin_ats_mlp.c b/src/ats/plugin_ats_mlp.c index 152b52d15..ec53e7438 100644 --- a/src/ats/plugin_ats_mlp.c +++ b/src/ats/plugin_ats_mlp.c | |||
@@ -1477,8 +1477,10 @@ notify (struct GAS_MLP_Handle *mlp, | |||
1477 | enum GAS_Solver_Status stat, | 1477 | enum GAS_Solver_Status stat, |
1478 | enum GAS_Solver_Additional_Information add) | 1478 | enum GAS_Solver_Additional_Information add) |
1479 | { | 1479 | { |
1480 | if (NULL != mlp->env->info_cb) | 1480 | mlp->env->info_cb (mlp->env->cls, |
1481 | mlp->env->info_cb (mlp->env->cls, op, stat, add); | 1481 | op, |
1482 | stat, | ||
1483 | add); | ||
1482 | } | 1484 | } |
1483 | 1485 | ||
1484 | 1486 | ||
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c index ad85f805e..b4cabb067 100644 --- a/src/ats/plugin_ats_proportional.c +++ b/src/ats/plugin_ats_proportional.c | |||
@@ -1097,53 +1097,61 @@ distribute_bandwidth_in_network (struct GAS_PROPORTIONAL_Handle *s, | |||
1097 | GNUNET_ATS_print_network_type(n->type), | 1097 | GNUNET_ATS_print_network_type(n->type), |
1098 | n->active_addresses, n->total_addresses); | 1098 | n->active_addresses, n->total_addresses); |
1099 | 1099 | ||
1100 | if (NULL != s->env->info_cb) | 1100 | s->env->info_cb (s->env->cls, |
1101 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_START, | 1101 | GAS_OP_SOLVE_START, |
1102 | GAS_STAT_SUCCESS, GAS_INFO_PROP_SINGLE); | 1102 | GAS_STAT_SUCCESS, |
1103 | GAS_INFO_PROP_SINGLE); | ||
1103 | 1104 | ||
1104 | /* Distribute */ | 1105 | /* Distribute */ |
1105 | distribute_bandwidth(s, n); | 1106 | distribute_bandwidth(s, n); |
1106 | 1107 | ||
1107 | if (NULL != s->env->info_cb) | 1108 | s->env->info_cb (s->env->cls, |
1108 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_STOP, | 1109 | GAS_OP_SOLVE_STOP, |
1109 | GAS_STAT_SUCCESS, GAS_INFO_PROP_SINGLE); | 1110 | GAS_STAT_SUCCESS, |
1110 | if (NULL != s->env->info_cb) | 1111 | GAS_INFO_PROP_SINGLE); |
1111 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_START, | 1112 | s->env->info_cb (s->env->cls, |
1112 | GAS_STAT_SUCCESS, GAS_INFO_PROP_SINGLE); | 1113 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_START, |
1114 | GAS_STAT_SUCCESS, | ||
1115 | GAS_INFO_PROP_SINGLE); | ||
1113 | 1116 | ||
1114 | /* Do propagation */ | 1117 | /* Do propagation */ |
1115 | propagate_bandwidth (s, n); | 1118 | propagate_bandwidth (s, n); |
1116 | 1119 | ||
1117 | if (NULL != s->env->info_cb) | 1120 | s->env->info_cb (s->env->cls, |
1118 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP, | 1121 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP, |
1119 | GAS_STAT_SUCCESS, GAS_INFO_PROP_SINGLE); | 1122 | GAS_STAT_SUCCESS, |
1123 | GAS_INFO_PROP_SINGLE); | ||
1120 | } | 1124 | } |
1121 | else | 1125 | else |
1122 | { | 1126 | { |
1123 | int i; | 1127 | int i; |
1124 | if (NULL != s->env->info_cb) | 1128 | s->env->info_cb (s->env->cls, |
1125 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_START, | 1129 | GAS_OP_SOLVE_START, |
1126 | GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL); | 1130 | GAS_STAT_SUCCESS, |
1131 | GAS_INFO_PROP_ALL); | ||
1127 | for (i = 0; i < s->network_count; i++) | 1132 | for (i = 0; i < s->network_count; i++) |
1128 | { | 1133 | { |
1129 | /* Distribute */ | 1134 | /* Distribute */ |
1130 | distribute_bandwidth(s, &s->network_entries[i]); | 1135 | distribute_bandwidth(s, &s->network_entries[i]); |
1131 | } | 1136 | } |
1132 | 1137 | ||
1133 | if (NULL != s->env->info_cb) | 1138 | s->env->info_cb (s->env->cls, |
1134 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_STOP, | 1139 | GAS_OP_SOLVE_STOP, |
1135 | GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL); | 1140 | GAS_STAT_SUCCESS, |
1136 | if (NULL != s->env->info_cb) | 1141 | GAS_INFO_PROP_ALL); |
1137 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_START, | 1142 | s->env->info_cb (s->env->cls, |
1138 | GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL); | 1143 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_START, |
1144 | GAS_STAT_SUCCESS, | ||
1145 | GAS_INFO_PROP_ALL); | ||
1139 | for (i = 0; i < s->network_count; i++) | 1146 | for (i = 0; i < s->network_count; i++) |
1140 | { | 1147 | { |
1141 | /* Do propagation */ | 1148 | /* Do propagation */ |
1142 | propagate_bandwidth(s, &s->network_entries[i]); | 1149 | propagate_bandwidth(s, &s->network_entries[i]); |
1143 | } | 1150 | } |
1144 | if (NULL != s->env->info_cb) | 1151 | s->env->info_cb (s->env->cls, |
1145 | s->env->info_cb(s->env->cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP, | 1152 | GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP, |
1146 | GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL); | 1153 | GAS_STAT_SUCCESS, |
1154 | GAS_INFO_PROP_ALL); | ||
1147 | } | 1155 | } |
1148 | } | 1156 | } |
1149 | 1157 | ||
diff --git a/src/ats/plugin_ats_ril.c b/src/ats/plugin_ats_ril.c index bd3c5e4a5..76212e835 100644 --- a/src/ats/plugin_ats_ril.c +++ b/src/ats/plugin_ats_ril.c | |||
@@ -783,8 +783,10 @@ ril_inform (struct GAS_RIL_Handle *solver, | |||
783 | enum GAS_Solver_Operation op, | 783 | enum GAS_Solver_Operation op, |
784 | enum GAS_Solver_Status stat) | 784 | enum GAS_Solver_Status stat) |
785 | { | 785 | { |
786 | if (NULL != solver->env->info_cb) | 786 | solver->env->info_cb (solver->env->cls, |
787 | solver->env->info_cb (solver->env->cls, op, stat, GAS_INFO_NONE); | 787 | op, |
788 | stat, | ||
789 | GAS_INFO_NONE); | ||
788 | } | 790 | } |
789 | 791 | ||
790 | /** | 792 | /** |