if (msize <
sizeof (struct SendMessage) + sizeof (struct GNUNET_MessageHeader))
{
- GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "about to assert fail, msize is %d, should be less than %d\n", msize, sizeof (struct SendMessage) + sizeof (struct GNUNET_MessageHeader));
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "about to assert fail, msize is %d, should be at least %d\n", msize, sizeof (struct SendMessage) + sizeof (struct GNUNET_MessageHeader));
GNUNET_break (0);
if (client != NULL)
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
{
struct Neighbour *n = cls;
+ if (GNUNET_YES != n->is_connected)
+ {
+ /* transport should only call us to transmit a message after
+ * telling us about a successful connection to the respective peer */
+ GNUNET_break (0);
+ return 0;
+ }
n->th = NULL;
if (buf == NULL)
{
n = create_neighbour (&cm->peer);
if ( (GNUNET_YES == n->is_connected) ||
(n->th != NULL) )
- return; /* already connected, or at least trying */
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Core received `%s' request for `%4s', already connected!\n",
+ "REQUEST_CONNECT",
+ GNUNET_i2s (&cm->peer));
+ return; /* already connected, or at least trying */
+ }
GNUNET_STATISTICS_update (stats, gettext_noop ("# connection requests received"), 1, GNUNET_NO);
-#if DEBUG_CORE
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Core received `%s' request for `%4s', will try to establish connection\n",
"REQUEST_CONNECT",
GNUNET_i2s (&cm->peer));
-#endif
+
timeout = GNUNET_TIME_relative_ntoh (cm->timeout);
/* ask transport to connect to the peer */
n->th = GNUNET_TRANSPORT_notify_transmit_ready (transport,
&my_identity,
sizeof (struct GNUNET_PeerIdentity)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
_("Received `%s' message that was for `%s', not for me. Ignoring.\n"),
"SET_KEY",
GNUNET_i2s (&m->target));
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Peer `%4s' disconnected from us.\n", GNUNET_i2s (peer));
+ "Peer `%4s' disconnected from us; received notification from transport.\n", GNUNET_i2s (peer));
#endif
+
n = find_neighbour (peer);
if (n == NULL)
{