aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r--src/core/core_api.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index a995eb27f..67b21ca26 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -277,7 +277,7 @@ timeout_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 277 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
278 "Transmission request timed out.\n"); 278 "Transmission request timed out.\n");
279 h = th->ch; 279 h = th->ch;
280 th->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK; 280 th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
281 GNUNET_assert (0 == th->get_message (th->get_message_cls, 0, NULL)); 281 GNUNET_assert (0 == th->get_message (th->get_message_cls, 0, NULL));
282 GNUNET_CORE_notify_transmit_ready_cancel (th); 282 GNUNET_CORE_notify_transmit_ready_cancel (th);
283} 283}
@@ -310,7 +310,7 @@ request_start (void *cls, size_t size, void *buf)
310 th->timeout_task = GNUNET_SCHEDULER_add_delayed (h->sched, 310 th->timeout_task = GNUNET_SCHEDULER_add_delayed (h->sched,
311 GNUNET_NO, 311 GNUNET_NO,
312 GNUNET_SCHEDULER_PRIORITY_KEEP, 312 GNUNET_SCHEDULER_PRIORITY_KEEP,
313 GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, 313 GNUNET_SCHEDULER_NO_TASK,
314 GNUNET_TIME_absolute_get_remaining 314 GNUNET_TIME_absolute_get_remaining
315 (th->timeout), 315 (th->timeout),
316 &timeout_request, th); 316 &timeout_request, th);
@@ -344,7 +344,7 @@ trigger_next_request (struct GNUNET_CORE_Handle *h)
344 return; /* no requests pending */ 344 return; /* no requests pending */
345 GNUNET_assert (NULL == h->th); 345 GNUNET_assert (NULL == h->th);
346 GNUNET_SCHEDULER_cancel (h->sched, th->timeout_task); 346 GNUNET_SCHEDULER_cancel (h->sched, th->timeout_task);
347 th->timeout_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK; 347 th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
348 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, 348 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client,
349 th->msize, 349 th->msize,
350 GNUNET_TIME_absolute_get_remaining 350 GNUNET_TIME_absolute_get_remaining
@@ -660,7 +660,7 @@ static void
660reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 660reconnect_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
661{ 661{
662 struct GNUNET_CORE_Handle *h = cls; 662 struct GNUNET_CORE_Handle *h = cls;
663 h->reconnect_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK; 663 h->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
664 reconnect (h); 664 reconnect (h);
665} 665}
666 666
@@ -702,7 +702,7 @@ transmit_start (void *cls, size_t size, void *buf)
702 h->reconnect_task = 702 h->reconnect_task =
703 GNUNET_SCHEDULER_add_delayed (h->sched, GNUNET_NO, 703 GNUNET_SCHEDULER_add_delayed (h->sched, GNUNET_NO,
704 GNUNET_SCHEDULER_PRIORITY_IDLE, 704 GNUNET_SCHEDULER_PRIORITY_IDLE,
705 GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, 705 GNUNET_SCHEDULER_NO_TASK,
706 delay, &reconnect_task, h); 706 delay, &reconnect_task, h);
707 return 0; 707 return 0;
708 } 708 }
@@ -837,7 +837,7 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
837{ 837{
838 if (handle->th != NULL) 838 if (handle->th != NULL)
839 GNUNET_NETWORK_notify_transmit_ready_cancel (handle->th); 839 GNUNET_NETWORK_notify_transmit_ready_cancel (handle->th);
840 if (handle->reconnect_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) 840 if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
841 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task); 841 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
842 GNUNET_CLIENT_disconnect (handle->client); 842 GNUNET_CLIENT_disconnect (handle->client);
843 GNUNET_free (handle); 843 GNUNET_free (handle);
@@ -858,7 +858,7 @@ produce_configure_message (void *cls, size_t size, void *buf)
858 /* communicate handle timeout/error! */ 858 /* communicate handle timeout/error! */
859 if (th->info != NULL) 859 if (th->info != NULL)
860 th->info (th->info_cls, NULL, 0, 0, GNUNET_TIME_UNIT_ZERO, 0, 0.0); 860 th->info (th->info_cls, NULL, 0, 0, GNUNET_TIME_UNIT_ZERO, 0, 0.0);
861 if (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) 861 if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
862 GNUNET_CORE_notify_transmit_ready_cancel (th); 862 GNUNET_CORE_notify_transmit_ready_cancel (th);
863 if (ch->submitted == th) 863 if (ch->submitted == th)
864 ch->submitted = NULL; 864 ch->submitted = NULL;
@@ -934,7 +934,7 @@ GNUNET_CORE_peer_configure (struct GNUNET_CORE_Handle *handle,
934 th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched, 934 th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched,
935 GNUNET_NO, 935 GNUNET_NO,
936 GNUNET_SCHEDULER_PRIORITY_KEEP, 936 GNUNET_SCHEDULER_PRIORITY_KEEP,
937 GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, 937 GNUNET_SCHEDULER_NO_TASK,
938 timeout, 938 timeout,
939 &timeout_request, th); 939 &timeout_request, th);
940 th->msize = sizeof (struct RequestConfigureMessage); 940 th->msize = sizeof (struct RequestConfigureMessage);
@@ -974,7 +974,7 @@ produce_send (void *cls, size_t size, void *buf)
974 GNUNET_i2s(&th->peer)); 974 GNUNET_i2s(&th->peer));
975#endif 975#endif
976 GNUNET_assert (0 == th->notify (th->notify_cls, 0, NULL)); 976 GNUNET_assert (0 == th->notify (th->notify_cls, 0, NULL));
977 if (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) 977 if (th->timeout_task != GNUNET_SCHEDULER_NO_TASK)
978 GNUNET_CORE_notify_transmit_ready_cancel (th); 978 GNUNET_CORE_notify_transmit_ready_cancel (th);
979 trigger_next_request (h); 979 trigger_next_request (h);
980 return 0; 980 return 0;
@@ -984,7 +984,7 @@ produce_send (void *cls, size_t size, void *buf)
984 "Preparing for P2P transmission to `%4s'.\n", 984 "Preparing for P2P transmission to `%4s'.\n",
985 GNUNET_i2s(&th->peer)); 985 GNUNET_i2s(&th->peer));
986#endif 986#endif
987 GNUNET_assert (th->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK); 987 GNUNET_assert (th->timeout_task != GNUNET_SCHEDULER_NO_TASK);
988 sm = (struct SendMessage *) buf; 988 sm = (struct SendMessage *) buf;
989 sm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_SEND); 989 sm->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_SEND);
990 sm->priority = htonl (th->priority); 990 sm->priority = htonl (th->priority);
@@ -1050,7 +1050,7 @@ GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle,
1050 th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched, 1050 th->timeout_task = GNUNET_SCHEDULER_add_delayed (handle->sched,
1051 GNUNET_NO, 1051 GNUNET_NO,
1052 GNUNET_SCHEDULER_PRIORITY_KEEP, 1052 GNUNET_SCHEDULER_PRIORITY_KEEP,
1053 GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, 1053 GNUNET_SCHEDULER_NO_TASK,
1054 maxdelay, 1054 maxdelay,
1055 &timeout_request, th); 1055 &timeout_request, th);
1056 th->priority = priority; 1056 th->priority = priority;
@@ -1088,7 +1088,7 @@ GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
1088 else 1088 else
1089 h->next->prev = h->prev; 1089 h->next->prev = h->prev;
1090 } 1090 }
1091 if (h->timeout_task != GNUNET_SCHEDULER_NO_PREREQUISITE_TASK) 1091 if (h->timeout_task != GNUNET_SCHEDULER_NO_TASK)
1092 GNUNET_SCHEDULER_cancel (handle->sched, h->timeout_task); 1092 GNUNET_SCHEDULER_cancel (handle->sched, h->timeout_task);
1093 GNUNET_free (h); 1093 GNUNET_free (h);
1094} 1094}