aboutsummaryrefslogtreecommitdiff
path: root/src/set/set_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/set/set_api.c')
-rw-r--r--src/set/set_api.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/set/set_api.c b/src/set/set_api.c
index 503c0c9c2..772140269 100644
--- a/src/set/set_api.c
+++ b/src/set/set_api.c
@@ -275,12 +275,12 @@ handle_copy_lazy (void *cls,
275 275
276 LOG (GNUNET_ERROR_TYPE_DEBUG, 276 LOG (GNUNET_ERROR_TYPE_DEBUG,
277 "Handling response to lazy copy\n"); 277 "Handling response to lazy copy\n");
278 278
279 GNUNET_CONTAINER_DLL_remove (set->copy_req_head, 279 GNUNET_CONTAINER_DLL_remove (set->copy_req_head,
280 set->copy_req_tail, 280 set->copy_req_tail,
281 req); 281 req);
282 282
283 283
284 // We pass none as operation here, since it doesn't matter when 284 // We pass none as operation here, since it doesn't matter when
285 // cloning. 285 // cloning.
286 new_set = create_internal (set->cfg, GNUNET_SET_OPERATION_NONE, &msg->cookie); 286 new_set = create_internal (set->cfg, GNUNET_SET_OPERATION_NONE, &msg->cookie);
@@ -790,11 +790,9 @@ GNUNET_SET_prepare (const struct GNUNET_PeerIdentity *other_peer,
790 * Connect to the set service in order to listen for requests. 790 * Connect to the set service in order to listen for requests.
791 * 791 *
792 * @param cls the `struct GNUNET_SET_ListenHandle *` to connect 792 * @param cls the `struct GNUNET_SET_ListenHandle *` to connect
793 * @param tc task context if invoked as a task, NULL otherwise
794 */ 793 */
795static void 794static void
796listen_connect (void *cls, 795listen_connect (void *cls);
797 const struct GNUNET_SCHEDULER_TaskContext *tc);
798 796
799 797
800/** 798/**
@@ -882,11 +880,9 @@ handle_client_listener_error (void *cls,
882 * Connect to the set service in order to listen for requests. 880 * Connect to the set service in order to listen for requests.
883 * 881 *
884 * @param cls the `struct GNUNET_SET_ListenHandle *` to connect 882 * @param cls the `struct GNUNET_SET_ListenHandle *` to connect
885 * @param tc task context if invoked as a task, NULL otherwise
886 */ 883 */
887static void 884static void
888listen_connect (void *cls, 885listen_connect (void *cls)
889 const struct GNUNET_SCHEDULER_TaskContext *tc)
890{ 886{
891 static const struct GNUNET_MQ_MessageHandler mq_handlers[] = { 887 static const struct GNUNET_MQ_MessageHandler mq_handlers[] = {
892 { &handle_request, GNUNET_MESSAGE_TYPE_SET_REQUEST }, 888 { &handle_request, GNUNET_MESSAGE_TYPE_SET_REQUEST },
@@ -895,9 +891,10 @@ listen_connect (void *cls,
895 struct GNUNET_SET_ListenHandle *lh = cls; 891 struct GNUNET_SET_ListenHandle *lh = cls;
896 struct GNUNET_MQ_Envelope *mqm; 892 struct GNUNET_MQ_Envelope *mqm;
897 struct GNUNET_SET_ListenMessage *msg; 893 struct GNUNET_SET_ListenMessage *msg;
894 const struct GNUNET_SCHEDULER_TaskContext *tc;
898 895
899 if ( (NULL != tc) && 896 tc = GNUNET_SCHEDULER_get_task_context ();
900 (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) ) 897 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
901 { 898 {
902 LOG (GNUNET_ERROR_TYPE_DEBUG, 899 LOG (GNUNET_ERROR_TYPE_DEBUG,
903 "Listener not reconnecting due to shutdown\n"); 900 "Listener not reconnecting due to shutdown\n");
@@ -947,7 +944,7 @@ GNUNET_SET_listen (const struct GNUNET_CONFIGURATION_Handle *cfg,
947 lh->operation = operation; 944 lh->operation = operation;
948 lh->app_id = *app_id; 945 lh->app_id = *app_id;
949 lh->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS; 946 lh->reconnect_backoff = GNUNET_TIME_UNIT_MILLISECONDS;
950 listen_connect (lh, NULL); 947 listen_connect (lh);
951 if (NULL == lh->client) 948 if (NULL == lh->client)
952 { 949 {
953 GNUNET_free (lh); 950 GNUNET_free (lh);