From 804ba15e1e5521547f7cff2252b2eae4e63da590 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 5 Feb 2015 19:58:37 +0000 Subject: dead code elimination --- src/ats/gnunet-service-ats_preferences.c | 38 -------------------------------- src/ats/gnunet-service-ats_preferences.h | 14 ------------ 2 files changed, 52 deletions(-) (limited to 'src') diff --git a/src/ats/gnunet-service-ats_preferences.c b/src/ats/gnunet-service-ats_preferences.c index ef7d94938..ea0210acb 100644 --- a/src/ats/gnunet-service-ats_preferences.c +++ b/src/ats/gnunet-service-ats_preferences.c @@ -837,44 +837,6 @@ GAS_normalization_get_preferences_by_peer (void *cls, } -/** - * Get the normalized preference values for a specific client and peer - * - * @param client client - * @param peer the peer - * @param pref the preference type - * @return the value - */ -double -GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, - const struct GNUNET_PeerIdentity *peer, - enum GNUNET_ATS_PreferenceKind pref) -{ - struct PreferenceClient *c_cur; - struct PreferencePeer *p_cur; - - /* Find preference client */ - for (c_cur = pc_head; NULL != c_cur; c_cur = c_cur->next) - { - if (client == c_cur->client) - break; - } - if (NULL == c_cur) - return -1.0; - - for (p_cur = c_cur->p_head; NULL != p_cur; p_cur = p_cur->next) - { - if (0 == memcmp (peer, &p_cur->id, sizeof (struct GNUNET_PeerIdentity))) - break; - } - if (NULL == p_cur) - return DEFAULT_REL_PREFERENCE; /* Not found, return default */ - - return p_cur->f_rel[pref]; -} - - - /** * A performance client disconnected * diff --git a/src/ats/gnunet-service-ats_preferences.h b/src/ats/gnunet-service-ats_preferences.h index ee8c931d6..e17a8bd22 100644 --- a/src/ats/gnunet-service-ats_preferences.h +++ b/src/ats/gnunet-service-ats_preferences.h @@ -61,20 +61,6 @@ GAS_normalization_get_preferences_by_peer (void *cls, const struct GNUNET_PeerIdentity *id); -/** - * Get the normalized preference values for a specific client and peer - * - * @param client client - * @param peer the peer - * @param pref the preference type - * @return the value - */ -double -GAS_normalization_get_preferences_by_client (const struct GNUNET_SERVER_Client *client, - const struct GNUNET_PeerIdentity *peer, - enum GNUNET_ATS_PreferenceKind pref); - - /** * Normalize an updated preference value * -- cgit v1.2.3