PHASE #1: (Goal: settle key design questions)
-TRANSPORT:
-* testcase fails the first time when run with fresh /tmp
- 1) CONNECT fails because no validated HELLO is available
- (actual validations are scheduled a few cycles later)
- 2) client waits for SEND_OK, which never comes (due to
- CONNECT request failing; TCP signals error, but
- "transmit_send_continuation" in gnunet-service-transport.c
- does not (and currently has no way to) signal this to
- the test-process => test-process eventually times out with
- fatal error
- 3) in the meantime, gnunet-service-transport validates the
- HELLOs => testcase passes next time...
-
Util:
* improve disk API [Nils] (Nils, is this done? -Christian)
* Windows: use events instead of pipes to signal select()s [Nils]
*/
struct GNUNET_TRANSPORT_TransmitHandle *transmit_handle;
-
/**
* Identity of this neighbour.
*/
{
struct GNUNET_TRANSPORT_TransmitHandle *th = cls;
- th->notify_delay_task
- = GNUNET_SCHEDULER_add_delayed (th->handle->sched,
- GNUNET_NO,
- GNUNET_SCHEDULER_PRIORITY_KEEP,
- GNUNET_SCHEDULER_NO_PREREQUISITE_TASK,
- GNUNET_TIME_absolute_get_remaining
- (th->timeout), &transmit_timeout, th);
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_PREREQUISITE_TASK;
try_connect (th);
}
pos->transmit_handle = NULL;
th->neighbour = NULL;
remove_from_any_list (th);
- if (GNUNET_TIME_absolute_get_remaining (th->timeout).value > CONNECT_RETRY_TIMEOUT.value)
+ if (GNUNET_TIME_absolute_get_remaining (th->timeout).value <= CONNECT_RETRY_TIMEOUT.value)
{
/* signal error */
- GNUNET_SCHEDULER_cancel (h->sched,
- th->notify_delay_task);
+ GNUNET_assert (GNUNET_SCHEDULER_NO_PREREQUISITE_TASK == th->notify_delay_task);
transmit_timeout (th, NULL);
}
else
{
/* try again in a bit */
- GNUNET_SCHEDULER_cancel (h->sched,
- th->notify_delay_task);
+ GNUNET_assert (GNUNET_SCHEDULER_NO_PREREQUISITE_TASK == th->notify_delay_task);
th->notify_delay_task
= GNUNET_SCHEDULER_add_delayed (h->sched,
GNUNET_NO,
"Receiving `%s' message, transmission %s.\n", "SEND_OK",
ntohl(okm->success) == GNUNET_OK ? "succeeded" : "failed");
#endif
- /* FIXME: need to check status code and change action accordingly,
- especially if the error was for CONNECT */
n = find_neighbour (h, &okm->peer);
GNUNET_assert (n != NULL);
n->transmit_ok = GNUNET_YES;
{
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Processing pending message\n");
+ "Processing pending message for `%4s'\n",
+ GNUNET_i2s(&n->id));
#endif
GNUNET_SCHEDULER_cancel (h->sched,
n->transmit_handle->notify_delay_task);