[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: TRANSPORT: improve PEERSTORE API usage.
From: |
gnunet |
Subject: |
[gnunet] branch master updated: TRANSPORT: improve PEERSTORE API usage. |
Date: |
Mon, 26 Feb 2024 08:53:06 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 6a5b821f6 TRANSPORT: improve PEERSTORE API usage.
6a5b821f6 is described below
commit 6a5b821f68b595dd6bd3355c417a12abff137b41
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Mon Feb 26 08:52:42 2024 +0100
TRANSPORT: improve PEERSTORE API usage.
---
src/service/transport/gnunet-communicator-tcp.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/service/transport/gnunet-communicator-tcp.c
b/src/service/transport/gnunet-communicator-tcp.c
index 189febfda..0e061ab76 100644
--- a/src/service/transport/gnunet-communicator-tcp.c
+++ b/src/service/transport/gnunet-communicator-tcp.c
@@ -1273,6 +1273,7 @@ rekey_monotime_store_cb (void *cls, int success)
"Failed to store rekey monotonic time in PEERSTORE!\n");
}
queue->rekey_monotime_sc = NULL;
+ GNUNET_PEERSTORE_iteration_next (queue->rekey_monotime_get, 1);
}
@@ -1318,6 +1319,8 @@ rekey_monotime_cb (void *cls,
"Queue from %s dropped, rekey monotime in the past\n",
GNUNET_i2s (&queue->target));
GNUNET_break (0);
+ GNUNET_PEERSTORE_iteration_stop (queue->rekey_monotime_get);
+ queue->rekey_monotime_get = NULL;
queue_finish (queue);
return;
}
@@ -1332,7 +1335,6 @@ rekey_monotime_cb (void *cls,
GNUNET_PEERSTORE_STOREOPTION_REPLACE,
&rekey_monotime_store_cb,
queue);
- GNUNET_PEERSTORE_iteration_next (queue->rekey_monotime_get, 1);
}
@@ -1432,6 +1434,7 @@ handshake_ack_monotime_store_cb (void *cls, int success)
"Failed to store handshake ack monotonic time in
PEERSTORE!\n");
}
queue->handshake_ack_monotime_sc = NULL;
+ GNUNET_PEERSTORE_iteration_next (queue->handshake_ack_monotime_get, 1);
}
@@ -1477,6 +1480,8 @@ handshake_ack_monotime_cb (void *cls,
"Queue from %s dropped, handshake ack monotime in the past\n",
GNUNET_i2s (&queue->target));
GNUNET_break (0);
+ GNUNET_PEERSTORE_iteration_stop (queue->handshake_ack_monotime_get);
+ queue->handshake_ack_monotime_get = NULL;
queue_finish (queue);
return;
}
@@ -1489,10 +1494,8 @@ handshake_ack_monotime_cb (void *cls,
sizeof(*handshake_ack_monotonic_time),
GNUNET_TIME_UNIT_FOREVER_ABS,
GNUNET_PEERSTORE_STOREOPTION_REPLACE,
- &
- handshake_ack_monotime_store_cb,
+ &handshake_ack_monotime_store_cb,
queue);
- GNUNET_PEERSTORE_iteration_next (queue->handshake_ack_monotime_get, 1);
}
@@ -1949,12 +1952,9 @@ try_handle_plaintext (struct Queue *queue)
queue->handshake_ack_monotime_get = GNUNET_PEERSTORE_iteration_start (
peerstore,
"transport_tcp_communicator",
- &queue->
- target
- ,
+ &queue->target,
GNUNET_PEERSTORE_TRANSPORT_TCP_COMMUNICATOR_HANDSHAKE_ACK,
- &
- handshake_ack_monotime_cb,
+ &handshake_ack_monotime_cb,
queue);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2745,6 +2745,7 @@ handshake_monotime_store_cb (void *cls, int success)
"Failed to store handshake monotonic time in PEERSTORE!\n");
}
queue->handshake_monotime_sc = NULL;
+ GNUNET_PEERSTORE_iteration_next (queue->handshake_ack_monotime_get, 1);
}
@@ -2796,6 +2797,8 @@ handshake_monotime_cb (void *cls,
"Queue from %s dropped, handshake monotime in the past\n",
GNUNET_i2s (&queue->target));
GNUNET_break (0);
+ GNUNET_PEERSTORE_iteration_stop (queue->handshake_ack_monotime_get);
+ queue->handshake_ack_monotime_get = NULL;
queue_finish (queue);
return;
}
@@ -2811,7 +2814,6 @@ handshake_monotime_cb (void *cls,
&
handshake_monotime_store_cb,
queue);
- GNUNET_PEERSTORE_iteration_next (queue->handshake_ack_monotime_get, 1);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: TRANSPORT: improve PEERSTORE API usage.,
gnunet <=