[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34002 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34002 - gnunet/src/cadet |
Date: |
Mon, 21 Jul 2014 02:15:32 +0200 |
Author: bartpolot
Date: 2014-07-21 02:15:32 +0200 (Mon, 21 Jul 2014)
New Revision: 34002
Modified:
gnunet/src/cadet/gnunet-service-cadet_peer.c
Log:
Force sending of KX messages even when connection queue is full
Modified: gnunet/src/cadet/gnunet-service-cadet_peer.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-07-21 00:15:31 UTC
(rev 34001)
+++ gnunet/src/cadet/gnunet-service-cadet_peer.c 2014-07-21 00:15:32 UTC
(rev 34002)
@@ -1208,7 +1208,7 @@
struct CadetConnection *c, int fwd,
GCP_sent cont, void *cont_cls)
{
- struct CadetPeerQueue *queue;
+ struct CadetPeerQueue *q;
int error_level;
int priority;
int call_core;
@@ -1243,26 +1243,27 @@
LOG (GNUNET_ERROR_TYPE_DEBUG, "priority %d\n", priority);
- call_core = NULL == c ? GNUNET_YES : GCC_is_sendable (c, fwd);
- queue = GNUNET_new (struct CadetPeerQueue);
- queue->cls = cls;
- queue->type = type;
- queue->payload_type = payload_type;
- queue->payload_id = payload_id;
- queue->size = size;
- queue->peer = peer;
- queue->c = c;
- queue->fwd = fwd;
- queue->callback = cont;
- queue->callback_cls = cont_cls;
+ call_core = (NULL == c || type == GNUNET_MESSAGE_TYPE_CADET_KX) ?
+ GNUNET_YES : GCC_is_sendable (c, fwd);
+ q = GNUNET_new (struct CadetPeerQueue);
+ q->cls = cls;
+ q->type = type;
+ q->payload_type = payload_type;
+ q->payload_id = payload_id;
+ q->size = size;
+ q->peer = peer;
+ q->c = c;
+ q->fwd = fwd;
+ q->callback = cont;
+ q->callback_cls = cont_cls;
if (100 > priority)
{
- GNUNET_CONTAINER_DLL_insert_tail (peer->queue_head, peer->queue_tail,
queue);
+ GNUNET_CONTAINER_DLL_insert_tail (peer->queue_head, peer->queue_tail, q);
peer->queue_n++;
}
else
{
- GNUNET_CONTAINER_DLL_insert (peer->queue_head, peer->queue_tail, queue);
+ GNUNET_CONTAINER_DLL_insert (peer->queue_head, peer->queue_tail, q);
call_core = GNUNET_YES;
}
@@ -1273,13 +1274,11 @@
GCP_2s (peer), size);
peer->core_transmit =
GNUNET_CORE_notify_transmit_ready (core_handle,
- GNUNET_NO, get_priority (queue),
+ GNUNET_NO, get_priority (q),
GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_PEER_resolve2 (peer->id),
- size,
- &queue_send,
- peer);
- queue->start_waiting = GNUNET_TIME_absolute_get ();
+ size, &queue_send, peer);
+ q->start_waiting = GNUNET_TIME_absolute_get ();
}
else if (GNUNET_NO == call_core)
{
@@ -1294,7 +1293,7 @@
}
queue_debug (peer, GNUNET_ERROR_TYPE_DEBUG);
- return queue;
+ return q;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34002 - gnunet/src/cadet,
gnunet <=