[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 02/05: rps: prepare cancellation of messages
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 02/05: rps: prepare cancellation of messages |
Date: |
Fri, 29 Dec 2017 00:56:19 +0100 |
This is an automated email from the git hooks/post-receive script.
julius-buenger pushed a commit to branch master
in repository gnunet.
commit 6aff933441751d07823546e942b8e4c368f1119d
Author: Julius Bünger <address@hidden>
AuthorDate: Fri Dec 29 00:45:57 2017 +0100
rps: prepare cancellation of messages
---
src/rps/gnunet-service-rps_peers.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/rps/gnunet-service-rps_peers.c
b/src/rps/gnunet-service-rps_peers.c
index 9cc4d3228..1c7bd07f8 100644
--- a/src/rps/gnunet-service-rps_peers.c
+++ b/src/rps/gnunet-service-rps_peers.c
@@ -653,9 +653,10 @@ insert_pending_message (const struct GNUNET_PeerIdentity
*peer,
* @brief Remove a pending message from the respective DLL
*
* @param pending_msg the pending message to remove
+ * @param cancel cancel the pending message, too
*/
static void
-remove_pending_message (struct PendingMessage *pending_msg)
+remove_pending_message (struct PendingMessage *pending_msg, int cancel)
{
struct PeerContext *peer_ctx;
@@ -663,7 +664,11 @@ remove_pending_message (struct PendingMessage *pending_msg)
GNUNET_CONTAINER_DLL_remove (peer_ctx->pending_messages_head,
peer_ctx->pending_messages_tail,
pending_msg);
- GNUNET_MQ_send_cancel (peer_ctx->pending_messages_head->ev);
+ // TODO wait for the cadet implementation of message cancellation
+ //if (GNUNET_YES == cancel)
+ //{
+ // GNUNET_MQ_send_cancel (pending_msg->ev);
+ //}
GNUNET_free (pending_msg);
}
@@ -728,7 +733,8 @@ mq_notify_sent_cb (void *cls)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"%s was sent.\n",
pending_msg->type);
- remove_pending_message (pending_msg);
+ /* Do not cancle message */
+ remove_pending_message (pending_msg, GNUNET_NO);
}
@@ -1154,7 +1160,8 @@ Peers_remove_peer (const struct GNUNET_PeerIdentity *peer)
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Removing unsent %s\n",
peer_ctx->pending_messages_head->type);
- remove_pending_message (peer_ctx->pending_messages_head);
+ /* Cancle pending message, too */
+ remove_pending_message (peer_ctx->pending_messages_head, GNUNET_YES);
}
/* If we are still waiting for notification whether this peer is live
* cancel the according task */
--
To stop receiving notification emails like this one, please contact
address@hidden