aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-10-24 21:45:44 +0000
committerChristian Grothoff <christian@grothoff.org>2009-10-24 21:45:44 +0000
commit47d7779091557516cda70ab9038dc2d460b0b3bb (patch)
tree2c8a334a40268d8b3717332a9d7278909830fab7 /src/core
parent267b8b5e0e264627f334a18ae1bf3f3a88ff2e32 (diff)
downloadgnunet-47d7779091557516cda70ab9038dc2d460b0b3bb.tar.gz
gnunet-47d7779091557516cda70ab9038dc2d460b0b3bb.zip
giving client API option for auto-retry, making more often use of transmit_and_get_response API and removing auto-retry code where enhanced client API can be used for it
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 89bae0525..2157584ab 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -94,7 +94,7 @@ struct GNUNET_CORE_Handle
94 /** 94 /**
95 * Handle for our current transmission request. 95 * Handle for our current transmission request.
96 */ 96 */
97 struct GNUNET_CONNECTION_TransmitHandle *th; 97 struct GNUNET_CLIENT_TransmitHandle *th;
98 98
99 /** 99 /**
100 * Head of doubly-linked list of pending requests. 100 * Head of doubly-linked list of pending requests.
@@ -257,6 +257,7 @@ reconnect (struct GNUNET_CORE_Handle *h)
257 sizeof (struct InitMessage) + 257 sizeof (struct InitMessage) +
258 sizeof (uint16_t) * h->hcnt, 258 sizeof (uint16_t) * h->hcnt,
259 GNUNET_TIME_UNIT_SECONDS, 259 GNUNET_TIME_UNIT_SECONDS,
260 GNUNET_NO,
260 &transmit_start, h); 261 &transmit_start, h);
261} 262}
262 263
@@ -346,7 +347,9 @@ trigger_next_request (struct GNUNET_CORE_Handle *h)
346 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client, 347 h->th = GNUNET_CLIENT_notify_transmit_ready (h->client,
347 th->msize, 348 th->msize,
348 GNUNET_TIME_absolute_get_remaining 349 GNUNET_TIME_absolute_get_remaining
349 (th->timeout), &request_start, 350 (th->timeout),
351 GNUNET_NO,
352 &request_start,
350 h); 353 h);
351} 354}
352 355
@@ -821,6 +824,7 @@ GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched,
821 GNUNET_CLIENT_notify_transmit_ready (h->client, 824 GNUNET_CLIENT_notify_transmit_ready (h->client,
822 sizeof (struct InitMessage) + 825 sizeof (struct InitMessage) +
823 sizeof (uint16_t) * h->hcnt, timeout, 826 sizeof (uint16_t) * h->hcnt, timeout,
827 GNUNET_YES,
824 &transmit_start, h); 828 &transmit_start, h);
825} 829}
826 830
@@ -834,7 +838,7 @@ void
834GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle) 838GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
835{ 839{
836 if (handle->th != NULL) 840 if (handle->th != NULL)
837 GNUNET_CONNECTION_notify_transmit_ready_cancel (handle->th); 841 GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th);
838 if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK) 842 if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
839 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task); 843 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
840 GNUNET_CLIENT_disconnect (handle->client); 844 GNUNET_CLIENT_disconnect (handle->client);