From: Christian Grothoff Date: Thu, 5 Feb 2015 19:57:26 +0000 (+0000) Subject: avoid void *, use proper type for client X-Git-Tag: initial-import-from-subversion-38251~2450 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=25d991395e2ea75d77d5ae87dca27ba5cd94e940;p=oweals%2Fgnunet.git avoid void *, use proper type for client --- diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c index f0b50b0eb..ef7d94938 100644 --- a/src/ats/gnunet-service-ats_preferences.c +++ b/src/ats/gnunet-service-ats_preferences.c @@ -207,7 +207,7 @@ static struct GNUNET_SCHEDULER_Task * aging_task; static struct GAS_Addresses_Preference_Clients * -find_preference_client (void *client) +find_preference_client (struct GNUNET_SERVER_Client *client) { struct GAS_Addresses_Preference_Clients *cur; @@ -516,7 +516,7 @@ GAS_preference_client_disconnect (struct GNUNET_SERVER_Client *client) * @param score_abs the new preference score */ static void -preference_change (void *client, +preference_change (struct GNUNET_SERVER_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, float score_abs) @@ -715,7 +715,7 @@ GAS_preference_done () * @param score_abs the normalized score */ void -GAS_normalization_normalize_preference (void *client, +GAS_normalization_normalize_preference (struct GNUNET_SERVER_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, float score_abs) @@ -846,7 +846,7 @@ GAS_normalization_get_preferences_by_peer (void *cls, * @return the value */ double -GAS_normalization_get_preferences_by_client (const void *client, +GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind pref) { @@ -881,7 +881,7 @@ GAS_normalization_get_preferences_by_client (const void *client, * @param client the client */ void -GAS_normalization_preference_client_disconnect (void *client) +GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client) { struct PreferenceClient *c_cur; /* Find preference client */ @@ -897,4 +897,3 @@ GAS_normalization_preference_client_disconnect (void *client) GNUNET_CONTAINER_DLL_remove(pc_head, pc_tail, c_cur); free_client (c_cur); } - diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h index 66610d470..ee8c931d6 100644 --- a/src/ats/gnunet-service-ats_preferences.h +++ b/src/ats/gnunet-service-ats_preferences.h @@ -70,7 +70,7 @@ GAS_normalization_get_preferences_by_peer (void *cls, * @return the value */ double -GAS_normalization_get_preferences_by_client (const void *client, +GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind pref); @@ -84,7 +84,7 @@ GAS_normalization_get_preferences_by_client (const void *client, * @param score_abs the normalized score */ void -GAS_normalization_normalize_preference (void *client, +GAS_normalization_normalize_preference (struct GNUNET_SERVER_Client *client, const struct GNUNET_PeerIdentity *peer, enum GNUNET_ATS_PreferenceKind kind, float score_abs); @@ -96,7 +96,7 @@ GAS_normalization_normalize_preference (void *client, * @param client the disconnecting client */ void -GAS_normalization_preference_client_disconnect (void *client); +GAS_normalization_preference_client_disconnect (struct GNUNET_SERVER_Client *client); /**