gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32124 - in gnunet/src: ats-tests core dht dv experimentati


From: gnunet
Subject: [GNUnet-SVN] r32124 - in gnunet/src: ats-tests core dht dv experimentation fs hostlist include mesh nse topology
Date: Thu, 30 Jan 2014 19:24:13 +0100

Author: grothoff
Date: 2014-01-30 19:24:13 +0100 (Thu, 30 Jan 2014)
New Revision: 32124

Modified:
   gnunet/src/ats-tests/ats-testing-traffic.c
   gnunet/src/core/core_api.c
   gnunet/src/core/gnunet-service-core.h
   gnunet/src/core/gnunet-service-core_clients.c
   gnunet/src/core/test_core_api.c
   gnunet/src/core/test_core_api_reliability.c
   gnunet/src/core/test_core_quota_compliance.c
   gnunet/src/dht/gnunet-service-dht_neighbours.c
   gnunet/src/dv/gnunet-service-dv.c
   gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/hostlist/hostlist-server.c
   gnunet/src/include/gnunet_core_service.h
   gnunet/src/mesh/gnunet-service-mesh_peer.c
   gnunet/src/nse/gnunet-service-nse.c
   gnunet/src/topology/gnunet-daemon-topology.c
Log:
towards reviving priorities in core API, this time with enum to make classes 
clearer

Modified: gnunet/src/ats-tests/ats-testing-traffic.c
===================================================================
--- gnunet/src/ats-tests/ats-testing-traffic.c  2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/ats-tests/ats-testing-traffic.c  2014-01-30 18:24:13 UTC (rev 
32124)
@@ -104,7 +104,9 @@
   if (GNUNET_YES == top->test_core)
   {
     p->cth = GNUNET_CORE_notify_transmit_ready (
-      p->me->ch, GNUNET_NO, 0, GNUNET_TIME_UNIT_MINUTES, &p->dest->id,
+      p->me->ch, GNUNET_NO,
+      GNUNET_CORE_PRIO_BEST_EFFORT,
+      GNUNET_TIME_UNIT_MINUTES, &p->dest->id,
       TEST_MESSAGE_SIZE, &send_ping_ready_cb, p);
   }
   else
@@ -159,9 +161,12 @@
   {
     GNUNET_assert (NULL == p->cth);
 
-    p->cth = GNUNET_CORE_notify_transmit_ready (p->me->ch, GNUNET_NO, 0,
-        GNUNET_TIME_UNIT_MINUTES, &p->dest->id, TEST_MESSAGE_SIZE,
-        &comm_send_pong_ready, p);
+    p->cth
+      = GNUNET_CORE_notify_transmit_ready (p->me->ch, GNUNET_NO,
+                                           GNUNET_CORE_PRIO_BEST_EFFORT,
+                                           GNUNET_TIME_UNIT_MINUTES,
+                                           &p->dest->id, TEST_MESSAGE_SIZE,
+                                           &comm_send_pong_ready, p);
   }
   else
   {

Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c  2014-01-30 17:29:08 UTC (rev 32123)
+++ gnunet/src/core/core_api.c  2014-01-30 18:24:13 UTC (rev 32124)
@@ -71,7 +71,7 @@
   /**
    * How important is this message?
    */
-  uint32_t priority;
+  enum GNUNET_CORE_Priority priority;
 
   /**
    * Size of this request.
@@ -517,7 +517,7 @@
   smr = (struct SendMessageRequest *) &cm[1];
   smr->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST);
   smr->header.size = htons (sizeof (struct SendMessageRequest));
-  smr->priority = htonl (th->priority);
+  smr->priority = htonl ((uint32_t) th->priority);
   smr->deadline = GNUNET_TIME_absolute_hton (th->timeout);
   smr->peer = pr->peer;
   smr->reserved = htonl (0);
@@ -653,7 +653,7 @@
        GNUNET_i2s (&pr->peer), (unsigned int) th->msize);
   sm = (struct SendMessage *) buf;
   sm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_SEND);
-  sm->priority = htonl (th->priority);
+  sm->priority = htonl ((uint32_t) th->priority);
   sm->deadline = GNUNET_TIME_absolute_hton (th->timeout);
   sm->peer = pr->peer;
   sm->cork = htonl ((uint32_t) th->cork);
@@ -1187,7 +1187,7 @@
 
 /**
  * Disconnect from the core service.  This function can only
- * be called *after* all pending 'GNUNET_CORE_notify_transmit_ready'
+ * be called *after* all pending #GNUNET_CORE_notify_transmit_ready()
  * requests have been explicitly canceled.
  *
  * @param handle connection to core to disconnect
@@ -1279,7 +1279,7 @@
  */
 struct GNUNET_CORE_TransmitHandle *
 GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
-                                   uint32_t priority,
+                                   enum GNUNET_CORE_Priority priority,
                                    struct GNUNET_TIME_Relative maxdelay,
                                    const struct GNUNET_PeerIdentity *target,
                                    size_t notify_size,
@@ -1289,9 +1289,6 @@
   struct PeerRecord *pr;
   struct GNUNET_CORE_TransmitHandle *th;
 
-  GNUNET_assert (NULL != handle);
-  GNUNET_assert (NULL != target);
-
   if (notify_size > GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE)
   {
      GNUNET_break (0);
@@ -1329,7 +1326,8 @@
   GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pr->ntr_task);
   pr->ntr_task =
     GNUNET_SCHEDULER_add_now (&run_request_next_transmission, pr);
-  LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmission request added to queue\n");
+  LOG (GNUNET_ERROR_TYPE_DEBUG,
+       "Transmission request added to queue\n");
   return th;
 }
 

Modified: gnunet/src/core/gnunet-service-core.h
===================================================================
--- gnunet/src/core/gnunet-service-core.h       2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/core/gnunet-service-core.h       2014-01-30 18:24:13 UTC (rev 
32124)
@@ -27,6 +27,7 @@
 #define GNUNET_SERVICE_CORE_H
 
 #include "gnunet_statistics_service.h"
+#include "gnunet_core_service.h"
 #include "core.h"
 
 /**
@@ -73,7 +74,7 @@
   /**
    * How important is this request.
    */
-  uint32_t priority;
+  enum GNUNET_CORE_Priority priority;
 
   /**
    * Has this request been solicited yet?

Modified: gnunet/src/core/gnunet-service-core_clients.c
===================================================================
--- gnunet/src/core/gnunet-service-core_clients.c       2014-01-30 17:29:08 UTC 
(rev 32123)
+++ gnunet/src/core/gnunet-service-core_clients.c       2014-01-30 18:24:13 UTC 
(rev 32124)
@@ -374,7 +374,7 @@
   }
 
   car = GNUNET_CONTAINER_multipeermap_get (c->requests, &req->peer);
-  if (car == NULL)
+  if (NULL == car)
   {
     /* create new entry */
     car = GNUNET_new (struct GSC_ClientActiveRequest);
@@ -391,7 +391,7 @@
   }
   car->target = req->peer;
   car->deadline = GNUNET_TIME_absolute_ntoh (req->deadline);
-  car->priority = ntohl (req->priority);
+  car->priority = (enum GNUNET_CORE_Priority) ntohl (req->priority);
   car->msize = ntohs (req->size);
   car->smr_id = req->smr_id;
   car->was_solicited = GNUNET_NO;
@@ -503,7 +503,7 @@
  * or other CLIENT (for loopback).
  *
  * @param cls closure
- * @param client reservation request ('struct GSC_ClientActiveRequest')
+ * @param client reservation request (`struct GSC_ClientActiveRequest`)
  * @param message the actual message
  */
 static int
@@ -560,7 +560,7 @@
  *
  * @param cls NULL
  * @param key identity of peer for which this is an active request
- * @param value the 'struct GSC_ClientActiveRequest' to free
+ * @param value the `struct GSC_ClientActiveRequest` to free
  * @return #GNUNET_YES (continue iteration)
  */
 static int

Modified: gnunet/src/core/test_core_api.c
===================================================================
--- gnunet/src/core/test_core_api.c     2014-01-30 17:29:08 UTC (rev 32123)
+++ gnunet/src/core/test_core_api.c     2014-01-30 18:24:13 UTC (rev 32124)
@@ -174,7 +174,8 @@
                 "Asking core (1) for transmission to peer `%4s'\n",
                 GNUNET_i2s (&p2.id));
     if (NULL ==
-        GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_YES, 0,
+        GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_YES,
+                                           GNUNET_CORE_PRIO_BEST_EFFORT,
                                            GNUNET_TIME_relative_multiply
                                            (GNUNET_TIME_UNIT_SECONDS, 145),
                                            &p2.id,

Modified: gnunet/src/core/test_core_api_reliability.c
===================================================================
--- gnunet/src/core/test_core_api_reliability.c 2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/core/test_core_api_reliability.c 2014-01-30 18:24:13 UTC (rev 
32124)
@@ -189,7 +189,8 @@
   {
     if (p1.ch != NULL)
       GNUNET_break (NULL !=
-                    GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                    GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                       
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                        FAST_TIMEOUT, &p2.id,
                                                        get_size (tr_n),
                                                        &transmit_ready, &p1));
@@ -250,7 +251,8 @@
         GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
     start_time = GNUNET_TIME_absolute_get ();
     GNUNET_break (NULL !=
-                  GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                  GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                     
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                      TIMEOUT, &p2.id,
                                                      get_size (0),
                                                      &transmit_ready, &p1));
@@ -340,7 +342,8 @@
   {
     if (n == tr_n)
       GNUNET_break (NULL !=
-                    GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                    GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                       
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                        FAST_TIMEOUT, &p2.id,
                                                        get_size (tr_n),
                                                        &transmit_ready, &p1));

Modified: gnunet/src/core/test_core_quota_compliance.c
===================================================================
--- gnunet/src/core/test_core_quota_compliance.c        2014-01-30 17:29:08 UTC 
(rev 32123)
+++ gnunet/src/core/test_core_quota_compliance.c        2014-01-30 18:24:13 UTC 
(rev 32124)
@@ -325,7 +325,8 @@
     if ((p1.ch != NULL) && (p1.connect_status == 1))
       GNUNET_break (NULL !=
                     (p1.nth =
-                     GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                     GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                        
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                         FAST_TIMEOUT, &p2.id,
                                                         MESSAGESIZE,
                                                         &transmit_ready, 
&p1)));
@@ -392,7 +393,8 @@
 
     GNUNET_break (NULL !=
                   (p1.nth =
-                   GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                   GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                      
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                       TIMEOUT, &p2.id,
                                                       MESSAGESIZE,
                                                       &transmit_ready, &p1)));
@@ -488,7 +490,8 @@
 
   if (running == GNUNET_YES)
     GNUNET_break (NULL !=
-                  GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO, 0,
+                  GNUNET_CORE_notify_transmit_ready (p1.ch, GNUNET_NO,
+                                                     
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                      FAST_TIMEOUT, &p2.id,
                                                      MESSAGESIZE,
                                                      &transmit_ready, &p1));

Modified: gnunet/src/dht/gnunet-service-dht_neighbours.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht_neighbours.c      2014-01-30 17:29:08 UTC 
(rev 32123)
+++ gnunet/src/dht/gnunet-service-dht_neighbours.c      2014-01-30 18:24:13 UTC 
(rev 32124)
@@ -793,16 +793,16 @@
     GNUNET_CONTAINER_DLL_remove (peer->head, peer->tail, pending);
     GNUNET_free (pending);
   }
-  if (pending == NULL)
+  if (NULL == pending)
   {
     /* no messages pending */
     return 0;
   }
-  if (buf == NULL)
+  if (NULL == buf)
   {
     peer->th =
         GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO,
-                                           pending->importance,
+                                           GNUNET_CORE_PRIO_BEST_EFFORT,
                                            GNUNET_TIME_absolute_get_remaining
                                            (pending->timeout), &peer->id,
                                            ntohs (pending->msg->size),
@@ -828,7 +828,7 @@
   {
     peer->th =
         GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO,
-                                           pending->importance,
+                                           GNUNET_CORE_PRIO_BEST_EFFORT,
                                            GNUNET_TIME_absolute_get_remaining
                                            (pending->timeout), &peer->id, 
msize,
                                            &core_transmit_notify, peer);
@@ -858,7 +858,7 @@
                             ntohs (pending->msg->size), GNUNET_NO);
   peer->th =
       GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO,
-                                         pending->importance,
+                                         GNUNET_CORE_PRIO_BEST_EFFORT,
                                          GNUNET_TIME_absolute_get_remaining
                                          (pending->timeout), &peer->id,
                                          ntohs (pending->msg->size),
@@ -2224,4 +2224,4 @@
 }
 
 
-/* end of gnunet-service-dht_neighbours.c */
\ No newline at end of file
+/* end of gnunet-service-dht_neighbours.c */

Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c   2014-01-30 17:29:08 UTC (rev 32123)
+++ gnunet/src/dv/gnunet-service-dv.c   2014-01-30 18:24:13 UTC (rev 32124)
@@ -637,7 +637,7 @@
     dn->cth =
       GNUNET_CORE_notify_transmit_ready (core_api,
                                         GNUNET_YES /* cork */,
-                                        0 /* priority */,
+                                        GNUNET_CORE_PRIO_BEST_EFFORT,
                                         GNUNET_TIME_UNIT_FOREVER_REL,
                                         &dn->peer,
                                         msize,
@@ -705,7 +705,7 @@
   if (NULL == target->cth)
     target->cth = GNUNET_CORE_notify_transmit_ready (core_api,
                                                     GNUNET_YES /* cork */,
-                                                    0 /* priority */,
+                                                    
GNUNET_CORE_PRIO_BEST_EFFORT,
                                                     
GNUNET_TIME_UNIT_FOREVER_REL,
                                                     &target->peer,
                                                     msize,

Modified: gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c
===================================================================
--- gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2014-01-30 17:29:08 UTC (rev 32123)
+++ gnunet/src/experimentation/gnunet-daemon-experimentation_nodes.c    
2014-01-30 18:24:13 UTC (rev 32124)
@@ -210,7 +210,9 @@
   if (NULL != e_ctx->n->cth)
     return;
 
-  e_ctx->n->cth = GNUNET_CORE_notify_transmit_ready (ch, GNUNET_NO, 0, 
FAST_TIMEOUT,
+  e_ctx->n->cth = GNUNET_CORE_notify_transmit_ready (ch, GNUNET_NO,
+                                                     
GNUNET_CORE_PRIO_BEST_EFFORT,
+                                                     FAST_TIMEOUT,
                                                     &e_ctx->n->id, e_ctx->size,
                                                     transmit_read_wrapper, 
e_ctx);
   if (NULL == e_ctx->n->cth)
@@ -281,7 +283,7 @@
   size_t ri_size = sizeof (struct GNUNET_CRYPTO_EddsaPublicKey) * 
my_issuer_count;
   size_t total_size = msg_size + ri_size;
   struct GNUNET_CRYPTO_EddsaPublicKey *issuers;
-       
+
   n->cth = NULL;
   if (NULL == buf)
   {

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2014-01-30 18:24:13 UTC (rev 
32124)
@@ -268,7 +268,7 @@
 
   /**
    * Set to 1 if we're currently in the process of calling
-   * 'GNUNET_CORE_notify_transmit_ready' (so while cth is
+   * #GNUNET_CORE_notify_transmit_ready() (so while cth is
    * NULL, we should not call notify_transmit_ready for this
    * handle right now).
    */
@@ -439,7 +439,8 @@
   GNUNET_assert (NULL == cp->cth);
   cp->cth_in_progress++;
   cp->cth =
-    GNUNET_CORE_notify_transmit_ready (GSF_core, GNUNET_YES, pth->priority,
+    GNUNET_CORE_notify_transmit_ready (GSF_core, GNUNET_YES,
+                                       GNUNET_CORE_PRIO_BACKGROUND,
                                       GNUNET_TIME_absolute_get_remaining
                                       (pth->timeout), &target, pth->size,
                                       &peer_transmit_ready_cb, cp);
@@ -558,7 +559,8 @@
     /* reservation success, try transmission now! */
     cp->cth_in_progress++;
     cp->cth =
-        GNUNET_CORE_notify_transmit_ready (GSF_core, GNUNET_YES, pth->priority,
+        GNUNET_CORE_notify_transmit_ready (GSF_core, GNUNET_YES,
+                                           GNUNET_CORE_PRIO_BACKGROUND,
                                            GNUNET_TIME_absolute_get_remaining
                                            (pth->timeout), peer, pth->size,
                                            &peer_transmit_ready_cb, cp);

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/hostlist/hostlist-server.c       2014-01-30 18:24:13 UTC (rev 
32124)
@@ -381,7 +381,8 @@
               "Asked core to transmit advertisement message with a size of %u 
bytes to peer `%s'\n",
               size, GNUNET_i2s (peer));
   if (NULL ==
-      GNUNET_CORE_notify_transmit_ready (core, GNUNET_YES, 0,
+      GNUNET_CORE_notify_transmit_ready (core, GNUNET_YES,
+                                         GNUNET_CORE_PRIO_BEST_EFFORT,
                                          GNUNET_ADV_TIMEOUT, peer, size,
                                          &adv_transmit_ready, NULL))
   {

Modified: gnunet/src/include/gnunet_core_service.h
===================================================================
--- gnunet/src/include/gnunet_core_service.h    2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/include/gnunet_core_service.h    2014-01-30 18:24:13 UTC (rev 
32124)
@@ -46,7 +46,35 @@
  */
 #define GNUNET_CORE_VERSION 0x00000001
 
+/**
+ * Traffic priorities.
+ */
+enum GNUNET_CORE_Priority
+{
 
+  /**
+   * Highest priority, control traffic (i.e. NSE, Core/Mesh KX).
+   */
+  GNUNET_CORE_PRIO_CRITICAL_CONTROL = 0,
+
+  /**
+   * Urgent traffic (local peer, i.e. conversation).
+   */
+  GNUNET_CORE_PRIO_URGENT = 1,
+
+  /**
+   * Normal traffic (i.e. mesh/dv relay, DHT)
+   */
+  GNUNET_CORE_PRIO_BEST_EFFORT = 2,
+
+  /**
+   * Background traffic (i.e. fs)
+   */
+  GNUNET_CORE_PRIO_BACKGROUND = 3
+
+};
+
+
 /**
  * Opaque handle to the service.
  */
@@ -59,8 +87,9 @@
  * @param cls closure
  * @param peer peer identity this notification is about
  */
-typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls,
-                                                 const struct 
GNUNET_PeerIdentity *peer);
+typedef void
+(*GNUNET_CORE_ConnectEventHandler) (void *cls,
+                                    const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -69,8 +98,9 @@
  * @param cls closure
  * @param peer peer identity this notification is about
  */
-typedef void (*GNUNET_CORE_DisconnectEventHandler) (void *cls,
-                                                    const struct 
GNUNET_PeerIdentity *peer);
+typedef void
+(*GNUNET_CORE_DisconnectEventHandler) (void *cls,
+                                       const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -84,11 +114,10 @@
  * @return #GNUNET_OK to keep the connection open,
  *         #GNUNET_SYSERR to close connection to the peer (signal serious 
error)
  */
-typedef int (*GNUNET_CORE_MessageCallback) (void *cls,
-                                            const struct GNUNET_PeerIdentity *
-                                            other,
-                                            const struct GNUNET_MessageHeader *
-                                            message);
+typedef int
+(*GNUNET_CORE_MessageCallback) (void *cls,
+                                const struct GNUNET_PeerIdentity *other,
+                                const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -98,7 +127,7 @@
 struct GNUNET_CORE_MessageHandler
 {
   /**
-   * Function to call for messages of "type".
+   * Function to call for messages of @e type.
    */
   GNUNET_CORE_MessageCallback callback;
 
@@ -129,8 +158,9 @@
  * @param cls closure
  * @param my_identity ID of this peer, NULL if we failed
  */
-typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
-                                             const struct GNUNET_PeerIdentity 
*my_identity);
+typedef void
+(*GNUNET_CORE_StartupCallback) (void *cls,
+                                const struct GNUNET_PeerIdentity *my_identity);
 
 
 /**
@@ -233,8 +263,9 @@
  *         if NULL is returned, "notify" will NOT be called.
  */
 struct GNUNET_CORE_TransmitHandle *
-GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
-                                   uint32_t priority,
+GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle,
+                                   int cork,
+                                   enum GNUNET_CORE_Priority priority,
                                    struct GNUNET_TIME_Relative maxdelay,
                                    const struct GNUNET_PeerIdentity *target,
                                    size_t notify_size,

Modified: gnunet/src/mesh/gnunet-service-mesh_peer.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-01-30 17:29:08 UTC (rev 
32123)
+++ gnunet/src/mesh/gnunet-service-mesh_peer.c  2014-01-30 18:24:13 UTC (rev 
32124)
@@ -838,7 +838,7 @@
       peer->core_transmit =
           GNUNET_CORE_notify_transmit_ready (core_handle,
                                              GNUNET_NO,
-                                             0,
+                                             GNUNET_CORE_PRIO_CRITICAL_CONTROL,
                                              GNUNET_TIME_UNIT_FOREVER_REL,
                                              dst_id,
                                              queue->size,
@@ -910,7 +910,8 @@
     {
       peer->core_transmit =
           GNUNET_CORE_notify_transmit_ready (core_handle,
-                                             GNUNET_NO, 0,
+                                             GNUNET_NO,
+                                             GNUNET_CORE_PRIO_CRITICAL_CONTROL,
                                              GNUNET_TIME_UNIT_FOREVER_REL,
                                              dst_id,
                                              queue->size,
@@ -1079,7 +1080,7 @@
     peer->core_transmit =
         GNUNET_CORE_notify_transmit_ready (core_handle,
                                            GNUNET_NO,
-                                           0,
+                                           GNUNET_CORE_PRIO_CRITICAL_CONTROL,
                                            GNUNET_TIME_UNIT_FOREVER_REL,
                                            GNUNET_PEER_resolve2 (peer->id),
                                            size,
@@ -1196,7 +1197,7 @@
   peer->core_transmit =
       GNUNET_CORE_notify_transmit_ready (core_handle,
                                          GNUNET_NO,
-                                         0,
+                                         GNUNET_CORE_PRIO_CRITICAL_CONTROL,
                                          GNUNET_TIME_UNIT_FOREVER_REL,
                                          GNUNET_PEER_resolve2 (peer->id),
                                          size,

Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2014-01-30 17:29:08 UTC (rev 32123)
+++ gnunet/src/nse/gnunet-service-nse.c 2014-01-30 18:24:13 UTC (rev 32124)
@@ -70,7 +70,7 @@
 /**
  * Message priority to use.
  */
-#define NSE_PRIORITY 5
+#define NSE_PRIORITY GNUNET_CORE_PRIO_CRITICAL_CONTROL
 
 #if FREEBSD
 #define log2(a) (log(a)/log(2))
@@ -660,7 +660,8 @@
 
   GNUNET_assert (NULL == peer_entry->th);
   peer_entry->th =
-      GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO, NSE_PRIORITY,
+      GNUNET_CORE_notify_transmit_ready (core_api, GNUNET_NO,
+                                         NSE_PRIORITY,
                                          GNUNET_TIME_UNIT_FOREVER_REL,
                                          &peer_entry->id,
                                          sizeof (struct

Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c        2014-01-30 17:29:08 UTC 
(rev 32123)
+++ gnunet/src/topology/gnunet-daemon-topology.c        2014-01-30 18:24:13 UTC 
(rev 32124)
@@ -641,7 +641,8 @@
   {
     /* now! */
     pl->hello_req =
-        GNUNET_CORE_notify_transmit_ready (handle, GNUNET_YES, 0,
+        GNUNET_CORE_notify_transmit_ready (handle, GNUNET_YES,
+                                           GNUNET_CORE_PRIO_BEST_EFFORT,
                                            GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                                            &pl->pid, next_want,
                                            &hello_advertising_ready, pl);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]