From: Christian Grothoff Date: Thu, 18 Mar 2010 09:31:00 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~22425 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e865ac5b941b9795af7126701054b9fea2c74fa0;p=oweals%2Fgnunet.git fix --- diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index f8340a258..2b7b13958 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c @@ -1241,6 +1241,7 @@ try_transmission_to_peer (struct NeighbourList *neighbour) struct ReadyList *rl; struct MessageQueue *mq; struct GNUNET_TIME_Relative timeout; + ssize_t ret; if (neighbour->messages_head == NULL) { @@ -1339,16 +1340,24 @@ try_transmission_to_peer (struct NeighbourList *neighbour) gettext_noop ("# bytes pending with plugins"), mq->message_buf_size, GNUNET_NO); - rl->plugin->api->send (rl->plugin->api->cls, - &mq->neighbour_id, - mq->message_buf, - mq->message_buf_size, - mq->priority, - GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, - mq->specific_address->addr, - mq->specific_address->addrlen, - GNUNET_YES /* FIXME: sometimes, we want to be more tolerant here! */, - &transmit_send_continuation, mq); + ret = rl->plugin->api->send (rl->plugin->api->cls, + &mq->neighbour_id, + mq->message_buf, + mq->message_buf_size, + mq->priority, + GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, + mq->specific_address->addr, + mq->specific_address->addrlen, + GNUNET_YES /* FIXME: sometimes, we want to be more tolerant here! */, + &transmit_send_continuation, mq); + if (ret == -1) + { + /* failure, but 'send' would not call continuation in this case, + so we need to do it here! */ + transmit_send_continuation (mq, + &mq->neighbour_id, + GNUNET_SYSERR); + } }