GNUNET_assert (NULL != udpw->frag_ctx);
if (GNUNET_OK == result)
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Fragment of message with %u bytes transmitted to %s\n",
+ (unsigned int) udpw->payload_size,
+ GNUNET_i2s (&udpw->session->target));
GNUNET_FRAGMENT_context_transmission_done (udpw->frag_ctx->frag);
GNUNET_STATISTICS_update (plugin->env->stats,
"# UDP, fragmented msgs, fragments, sent, success",
}
else
{
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Failed to transmit fragment of message with %u bytes to %s\n",
+ (unsigned int) udpw->payload_size,
+ GNUNET_i2s (&udpw->session->target));
fragmented_message_done (udpw->frag_ctx,
GNUNET_SYSERR);
GNUNET_STATISTICS_update (plugin->env->stats,
msg_len);
enqueue (plugin,
udpw);
+ if (session->address->address_length == sizeof (struct IPv4UdpAddress))
+ schedule_select_v4 (plugin);
+ else
+ schedule_select_v6 (plugin);
}
"# UDP, unfragmented bytes payload queued total",
msgbuf_size,
GNUNET_NO);
+ if (s->address->address_length == sizeof (struct IPv4UdpAddress))
+ schedule_select_v4 (plugin);
+ else
+ schedule_select_v6 (plugin);
}
else
{
notify_session_monitor (s->plugin,
s,
GNUNET_TRANSPORT_SS_UPDATE);
- if (s->address->address_length == sizeof (struct IPv4UdpAddress))
- schedule_select_v4 (plugin);
- else
- schedule_select_v6 (plugin);
return udpmlen;
}
#if VERBOSE
if (ntohl (hdr->num) % 5 == 0)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Got message %u of size %u\n",
- ntohl (hdr->num), ntohs (message->size));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Got message %u of size %u\n",
+ ntohl (hdr->num),
+ ntohs (message->size));
}
#endif
n++;
static void
notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' connected to us (%p)!\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Peer `%4s' connected to us (%p)!\n",
GNUNET_i2s (peer), cls);
}
static void
notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Peer `%4s' disconnected (%p)!\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Peer `%4s' disconnected (%p)!\n",
GNUNET_i2s (peer), cls);
if (th != NULL)
GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
static void
-sendtask ()
+sendtask (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc)
{
start_time = GNUNET_TIME_absolute_get ();
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
NULL);
}
+
static void
-testing_connect_cb (struct PeerContext *p1, struct PeerContext *p2, void *cls)
+testing_connect_cb (struct PeerContext *p1,
+ struct PeerContext *p2,
+ void *cls)
{
char *p1_c = GNUNET_strdup (GNUNET_i2s (&p1->id));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Peers connected: %s <-> %s\n", p1_c,
+ "Peers connected: %s <-> %s\n",
+ p1_c,
GNUNET_i2s (&p2->id));
GNUNET_free (p1_c);
if (bytes_physical >= bytes_msg)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Overhead for %u byte message: %u\n",
+ "Overhead for %u byte message was %u\n",
bytes_msg,
bytes_physical - bytes_msg);
n->traffic_overhead += bytes_physical - bytes_msg;
n->th->timeout_task = NULL;
/* we've been waiting for this (congestion, not quota,
* caused delayed transmission) */
- n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0);
- schedule_transmission (h);
+ n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap,
+ n,
+ 0);
}
+ schedule_transmission (h);
break;
case GNUNET_MESSAGE_TYPE_TRANSPORT_RECV:
if (size <
break;
}
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Received message of type %u from `%s'.\n",
- ntohs (imm->type), GNUNET_i2s (&im->peer));
+ "Received message of type %u with %u bytes from `%s'.\n",
+ (unsigned int) ntohs (imm->type),
+ (unsigned int) ntohs (imm->size),
+ GNUNET_i2s (&im->peer));
n = neighbour_find (h, &im->peer);
if (NULL == n)
{
}
else
{
+ if (GNUNET_YES != n->is_ready)
+ return; /* service not ready for another one */
n = GNUNET_CONTAINER_heap_peek (h->ready_heap);
if (NULL == n)
return; /* no pending messages */
n->traffic_overhead = 0;
}
else
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "No work to be done, not scheduling transmission.\n");
return; /* no work to be done */
+ }
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Scheduling next transmission to service in %s\n",
GNUNET_STRINGS_relative_time_to_string (delay,
if (NULL == buf)
{
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Discarding `%s' request to `%s' due to error in transport service connection.\n",
- "REQUEST_CONNECT",
+ "Discarding REQUEST_CONNECT request to `%s' due to error in transport service connection.\n",
GNUNET_i2s (&tch->pid));
if (NULL != tch->cb)
tch->cb (tch->cb_cls,