diff options
Diffstat (limited to 'src/ats/ats_api_performance.c')
-rw-r--r-- | src/ats/ats_api_performance.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 5cb199266..25b492614 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c | |||
@@ -830,6 +830,22 @@ GNUNET_ATS_performance_list_addresses_cancel (struct GNUNET_ATS_AddressListHandl | |||
830 | 830 | ||
831 | 831 | ||
832 | /** | 832 | /** |
833 | * Convert a GNUNET_ATS_PreferenceType to a string | ||
834 | * | ||
835 | * @param type the preference type | ||
836 | * @return a string or NULL if invalid | ||
837 | */ | ||
838 | const char * | ||
839 | GNUNET_ATS_print_preference_type (uint32_t type) | ||
840 | { | ||
841 | char *prefs[GNUNET_ATS_PreferenceCount] = GNUNET_ATS_PreferenceTypeString; | ||
842 | if (type < GNUNET_ATS_PreferenceCount) | ||
843 | return prefs[type]; | ||
844 | return NULL; | ||
845 | } | ||
846 | |||
847 | |||
848 | /** | ||
833 | * Change preferences for the given peer. Preference changes are forgotten if peers | 849 | * Change preferences for the given peer. Preference changes are forgotten if peers |
834 | * disconnect. | 850 | * disconnect. |
835 | * | 851 | * |