summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-tng.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-05-05 14:02:24 +0200
committerChristian Grothoff <christian@grothoff.org>2019-05-05 14:02:24 +0200
commite94c5914935ca0842ca762d343cb167c68b8a79a (patch)
tree4719d48bbcd9be334854d0ed88ba76f5b259b296 /src/transport/gnunet-service-tng.c
parentb84057d7593651e16a161de9f2ec51f93c98589d (diff)
use new PriorityPreferences consistently, note on deprecation
Diffstat (limited to 'src/transport/gnunet-service-tng.c')
-rw-r--r--src/transport/gnunet-service-tng.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c
index 443c7f245..ab9159963 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -1757,8 +1757,10 @@ struct PeerRequest
/**
* What kind of performance preference does this @e tc have?
+ *
+ * TODO: use this!
*/
- enum GNUNET_MQ_PreferenceKind pk;
+ enum GNUNET_MQ_PriorityPreferences pk;
/**
* How much bandwidth would this @e tc like to see?
@@ -1953,6 +1955,12 @@ struct PendingMessage
enum PendingMessageType pmt;
/**
+ * Preferences for this message.
+ * TODO: actually use this!
+ */
+ enum GNUNET_MQ_PriorityPreferences prefs;
+
+ /**
* Size of the original message.
*/
uint16_t bytes_msg;
@@ -3736,7 +3744,6 @@ handle_client_send (void *cls, const struct OutboundMessage *obm)
obmm = (const struct GNUNET_MessageHeader *) &obm[1];
bytes_msg = ntohs (obmm->size);
pp = (enum GNUNET_MQ_PriorityPreferences) ntohl (obm->priority);
- /* FIXME: actually make use of pp */ (void) pp;
vl = GNUNET_CONTAINER_multipeermap_get (links, &obm->peer);
if (NULL == vl)
{
@@ -3790,6 +3797,7 @@ handle_client_send (void *cls, const struct OutboundMessage *obm)
was_empty = (NULL == target->pending_msg_head);
pm = GNUNET_malloc (sizeof (struct PendingMessage) + payload_size);
+ pm->prefs = pp;
pm->client = tc;
pm->target = target;
pm->bytes_msg = payload_size;
@@ -8559,7 +8567,7 @@ handle_suggest (void *cls, const struct ExpressPreferenceMessage *msg)
pr->tc = tc;
pr->pid = msg->peer;
pr->bw = msg->bw;
- pr->pk = (enum GNUNET_MQ_PreferenceKind) ntohl (msg->pk);
+ pr->pk = (enum GNUNET_MQ_PriorityPreferences) ntohl (msg->pk);
if (GNUNET_YES != GNUNET_CONTAINER_multipeermap_put (
tc->details.application.requests,
&pr->pid,