aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-05 19:57:26 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-05 19:57:26 +0000
commit25d991395e2ea75d77d5ae87dca27ba5cd94e940 (patch)
treeb9626ffde0b061c7a716b3d54e1eddbca7e05f36
parent52ae7e53f6b8dfd26612e4e9f0830918fd1ee312 (diff)
avoid void *, use proper type for client
-rw-r--r--src/ats/gnunet-service-ats_preferences.c11
-rw-r--r--src/ats/gnunet-service-ats_preferences.h6
2 files changed, 8 insertions, 9 deletions
diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c
index f0b50b0eba..ef7d949383 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 66610d4709..ee8c931d6f 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);
/**