diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-10 08:04:52 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2013-09-10 08:04:52 +0000 |
commit | 0429f53f9bd2e4c20da01f4e648eba1776473766 (patch) | |
tree | eb2d11718e93ab345ba0ca168109bb1782cec0bb /src/ats/gnunet-service-ats_addresses.c | |
parent | 40efeb2dec958aecf4401ff555bdec1fdeb64755 (diff) | |
download | gnunet-0429f53f9bd2e4c20da01f4e648eba1776473766.tar.gz gnunet-0429f53f9bd2e4c20da01f4e648eba1776473766.zip |
renaming according to new speak
Diffstat (limited to 'src/ats/gnunet-service-ats_addresses.c')
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index 461a7e04f..0637257d2 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -121,7 +121,7 @@ | |||
121 | * it as a value_number. If no configuration value is found it will assign | 121 | * it as a value_number. If no configuration value is found it will assign |
122 | * GNUNET_ATS_DefaultBandwidth. The most important step is to load the | 122 | * GNUNET_ATS_DefaultBandwidth. The most important step is to load the |
123 | * configured solver using configuration "[ats]:MODE". Current solvers are | 123 | * configured solver using configuration "[ats]:MODE". Current solvers are |
124 | * MODE_SIMPLISTIC, MODE_MLP. Interaction is done using a solver API | 124 | * MODE_PROPORTIONAL, MODE_MLP. Interaction is done using a solver API |
125 | * | 125 | * |
126 | * 1.4 Solver API | 126 | * 1.4 Solver API |
127 | * | 127 | * |
@@ -237,13 +237,13 @@ | |||
237 | enum ATS_Mode | 237 | enum ATS_Mode |
238 | { | 238 | { |
239 | /* | 239 | /* |
240 | * Simplistic mode: | 240 | * proportional mode: |
241 | * | 241 | * |
242 | * Assign each peer an equal amount of bandwidth (bw) | 242 | * Assign each peer an equal amount of bandwidth (bw) |
243 | * | 243 | * |
244 | * bw_per_peer = bw_total / #active addresses | 244 | * bw_per_peer = bw_total / #active addresses |
245 | */ | 245 | */ |
246 | MODE_SIMPLISTIC, | 246 | MODE_PROPORTIONAL, |
247 | 247 | ||
248 | /* | 248 | /* |
249 | * MLP mode: | 249 | * MLP mode: |
@@ -1723,23 +1723,23 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1723 | /* Figure out configured solution method */ | 1723 | /* Figure out configured solution method */ |
1724 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, "ats", "MODE", &mode_str)) | 1724 | if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_string (cfg, "ats", "MODE", &mode_str)) |
1725 | { | 1725 | { |
1726 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "No resource assignment method configured, using simplistic approach\n"); | 1726 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "No resource assignment method configured, using proportional approach\n"); |
1727 | ah->ats_mode = MODE_SIMPLISTIC; | 1727 | ah->ats_mode = MODE_PROPORTIONAL; |
1728 | } | 1728 | } |
1729 | else | 1729 | else |
1730 | { | 1730 | { |
1731 | for (c = 0; c < strlen (mode_str); c++) | 1731 | for (c = 0; c < strlen (mode_str); c++) |
1732 | mode_str[c] = toupper (mode_str[c]); | 1732 | mode_str[c] = toupper (mode_str[c]); |
1733 | if (0 == strcmp (mode_str, "SIMPLISTIC")) | 1733 | if (0 == strcmp (mode_str, "PROPORTIONAL")) |
1734 | { | 1734 | { |
1735 | ah->ats_mode = MODE_SIMPLISTIC; | 1735 | ah->ats_mode = MODE_PROPORTIONAL; |
1736 | } | 1736 | } |
1737 | else if (0 == strcmp (mode_str, "MLP")) | 1737 | else if (0 == strcmp (mode_str, "MLP")) |
1738 | { | 1738 | { |
1739 | ah->ats_mode = MODE_MLP; | 1739 | ah->ats_mode = MODE_MLP; |
1740 | #if !HAVE_LIBGLPK | 1740 | #if !HAVE_LIBGLPK |
1741 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Assignment method `%s' configured, but GLPK is not available, please install \n", mode_str); | 1741 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Assignment method `%s' configured, but GLPK is not available, please install \n", mode_str); |
1742 | ah->ats_mode = MODE_SIMPLISTIC; | 1742 | ah->ats_mode = MODE_PROPORTIONAL; |
1743 | #endif | 1743 | #endif |
1744 | } | 1744 | } |
1745 | else if (0 == strcmp (mode_str, "RIL")) | 1745 | else if (0 == strcmp (mode_str, "RIL")) |
@@ -1748,8 +1748,8 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1748 | } | 1748 | } |
1749 | else | 1749 | else |
1750 | { | 1750 | { |
1751 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid resource assignment method `%s' configured, using simplistic approach\n", mode_str); | 1751 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid resource assignment method `%s' configured, using proportional approach\n", mode_str); |
1752 | ah->ats_mode = MODE_SIMPLISTIC; | 1752 | ah->ats_mode = MODE_PROPORTIONAL; |
1753 | } | 1753 | } |
1754 | GNUNET_free (mode_str); | 1754 | GNUNET_free (mode_str); |
1755 | } | 1755 | } |
@@ -1779,9 +1779,9 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1779 | return NULL; | 1779 | return NULL; |
1780 | #endif | 1780 | #endif |
1781 | break; | 1781 | break; |
1782 | case MODE_SIMPLISTIC: | 1782 | case MODE_PROPORTIONAL: |
1783 | /* Init the simplistic solver with default values */ | 1783 | /* Init the proportional solver with default values */ |
1784 | ah->ats_mode = MODE_SIMPLISTIC; | 1784 | ah->ats_mode = MODE_PROPORTIONAL; |
1785 | ah->s_init = &GAS_proportional_init; | 1785 | ah->s_init = &GAS_proportional_init; |
1786 | ah->s_add = &GAS_proportional_address_add; | 1786 | ah->s_add = &GAS_proportional_address_add; |
1787 | ah->s_address_update_property = &GAS_proportional_address_property_changed; | 1787 | ah->s_address_update_property = &GAS_proportional_address_property_changed; |
@@ -1796,7 +1796,7 @@ GAS_addresses_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1796 | ah->s_bulk_start = &GAS_proportional_bulk_start; | 1796 | ah->s_bulk_start = &GAS_proportional_bulk_start; |
1797 | ah->s_bulk_stop = &GAS_proportional_bulk_stop; | 1797 | ah->s_bulk_stop = &GAS_proportional_bulk_stop; |
1798 | ah->s_done = &GAS_proportional_done; | 1798 | ah->s_done = &GAS_proportional_done; |
1799 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS started in %s mode\n", "SIMPLISTIC"); | 1799 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "ATS started in %s mode\n", "PROPORTIONAL"); |
1800 | break; | 1800 | break; |
1801 | case MODE_RIL: | 1801 | case MODE_RIL: |
1802 | /* Init the ril solver with default values */ | 1802 | /* Init the ril solver with default values */ |