avoid void *, use proper type for client
authorChristian Grothoff <christian@grothoff.org>
Thu, 5 Feb 2015 19:57:26 +0000 (19:57 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 5 Feb 2015 19:57:26 +0000 (19:57 +0000)
src/ats/gnunet-service-ats_preferences.c
src/ats/gnunet-service-ats_preferences.h

index f0b50b0eba89e7cccfb8a0280ab4f4c556c97c4d..ef7d949383f8084c1bd1023f87f0607f58ed4639 100644 (file)
@@ -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);
 }
-
index 66610d470909fc9f435fac13de60c2b5a74d486d..ee8c931d6f30ce95ef97c0d75a84138cdb34b169 100644 (file)
@@ -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);
 
 
 /**