diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-11-22 22:04:48 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-11-22 22:04:48 +0100 |
commit | c87f73a07df468eccedbe1fdfa82bdd5b633a0d5 (patch) | |
tree | 0bb3f63e727a65dc84c33a03229b6760edee82ee /src/util/mq.c | |
parent | dd7379052f3749d87d8c35969ec94b4580e998b5 (diff) | |
download | gnunet-c87f73a07df468eccedbe1fdfa82bdd5b633a0d5.tar.gz gnunet-c87f73a07df468eccedbe1fdfa82bdd5b633a0d5.zip |
move network type logic out of ATS code, move performance preferences into MQ
Diffstat (limited to 'src/util/mq.c')
-rw-r--r-- | src/util/mq.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/util/mq.c b/src/util/mq.c index eaac85575..8bf1f9752 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
@@ -1270,5 +1270,27 @@ GNUNET_MQ_count_handlers (const struct GNUNET_MQ_MessageHandler *handlers) | |||
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | 1272 | ||
1273 | /** | ||
1274 | * Convert an `enum GNUNET_MQ_PreferenceType` to a string | ||
1275 | * | ||
1276 | * @param type the preference type | ||
1277 | * @return a string or NULL if invalid | ||
1278 | */ | ||
1279 | const char * | ||
1280 | GNUNET_MQ_preference_to_string (enum GNUNET_MQ_PreferenceKind type) | ||
1281 | { | ||
1282 | switch (type) { | ||
1283 | case GNUNET_MQ_PREFERENCE_NONE: | ||
1284 | return "NONE"; | ||
1285 | case GNUNET_MQ_PREFERENCE_BANDWIDTH: | ||
1286 | return "BANDWIDTH"; | ||
1287 | case GNUNET_MQ_PREFERENCE_LATENCY: | ||
1288 | return "LATENCY"; | ||
1289 | case GNUNET_MQ_PREFERENCE_RELIABILITY: | ||
1290 | return "RELIABILITY"; | ||
1291 | }; | ||
1292 | return NULL; | ||
1293 | } | ||
1294 | |||
1273 | 1295 | ||
1274 | /* end of mq.c */ | 1296 | /* end of mq.c */ |