/* FIXME: support bi-directional use of TCP */
if (mq->specific_address == NULL)
mq->specific_address = find_ready_address(neighbour);
- GNUNET_CONTAINER_DLL_remove (neighbour->messages_head,
- neighbour->messages_tail,
- mq);
if (mq->specific_address == NULL)
{
timeout = GNUNET_TIME_absolute_get_remaining (mq->timeout);
#endif
if (mq->client != NULL)
transmit_send_ok (mq->client, neighbour, GNUNET_NO);
+ GNUNET_CONTAINER_DLL_remove (neighbour->messages_head,
+ neighbour->messages_tail,
+ mq);
GNUNET_free (mq);
return; /* nobody ready */
}
#endif
return;
}
+ GNUNET_CONTAINER_DLL_remove (neighbour->messages_head,
+ neighbour->messages_tail,
+ mq);
if (mq->specific_address->connected == GNUNET_NO)
mq->specific_address->connect_attempts++;
rl = mq->specific_address->ready_list;
ret += (mret + sizeof (struct OutboundMessage));
size -= (mret + sizeof (struct OutboundMessage));
}
+ else
+ {
+ switch (n->transmit_stage)
+ {
+ case TS_NEW:
+ GNUNET_break (0);
+ break;
+ case TS_QUEUED:
+ GNUNET_break (0);
+ break;
+ case TS_TRANSMITTED:
+ n->transmit_stage = TS_NEW;
+ break;
+ case TS_TRANSMITTED_QUEUED:
+ GNUNET_break (0);
+ break;
+ default:
+ GNUNET_break (0);
+ }
+ }
}
schedule_transmission (h);
#if DEBUG_TRANSPORT
void *notify_cls;
th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
+ n = th->neighbour;
+#if DEBUG_TRANSPORT
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Triggering timeout for request to transmit to `%4s' (%d)\n",
+ GNUNET_i2s (&n->id),
+ n->transmit_stage);
+#endif
notify = th->notify;
notify_cls = th->notify_cls;
- n = th->neighbour;
switch (n->transmit_stage)
{
case TS_NEW: