/**
* It is a blacklist, query about allowed connections.
*/
- CT_BLACKLIST = 3
+ CT_BLACKLIST = 3,
+
+ /**
+ * CORE client without any handlers.
+ */
+ CT_CORE_NO_HANDLERS = 4
};
GNUNET_MQ_get_length (tc->mq),
MAX_PENDING);
GNUNET_STATISTICS_update (GST_stats,
- gettext_noop
- ("# messages dropped due to slow client"), 1,
+ gettext_noop ("# messages dropped due to slow client"),
+ 1,
GNUNET_NO);
return;
}
bc);
}
break;
+ case CT_CORE_NO_HANDLERS:
+ break;
}
GNUNET_free (tc);
}
}
if (0 != (2 & options))
tc->type = CT_CORE;
+ else
+ tc->type = CT_CORE_NO_HANDLERS;
hello = GST_hello_get ();
if (NULL != hello)
unicast (tc,
GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
int may_drop)
{
- struct TransportClient *tc;
int done;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
(unsigned int) ntohs (msg->type),
(unsigned int) ntohs (msg->size));
done = GNUNET_NO;
- for (tc = clients_head; NULL != tc; tc = tc->next)
+ for (struct TransportClient *tc = clients_head;
+ NULL != tc;
+ tc = tc->next)
{
+ if (CT_NONE == tc->type)
+ continue; /* client not yet ready */
if ( (GNUNET_YES == may_drop) &&
(CT_CORE != tc->type) )
continue; /* skip, this client does not care about payload */
{
struct GNUNET_MQ_Envelope *env;
struct PeerIterateResponseMessage *msg;
- struct TransportClient *tc;
msg = compose_address_iterate_response_message (peer,
address);
msg->state = htonl (state);
msg->state_timeout = GNUNET_TIME_absolute_hton (state_timeout);
- for (tc = clients_head; NULL != tc; tc = tc->next)
+ for (struct TransportClient *tc = clients_head;
+ NULL != tc;
+ tc = tc->next)
{
if (CT_MONITOR != tc->type)
continue;