[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12822 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12822 - gnunet/src/core |
Date: |
Fri, 3 Sep 2010 17:32:39 +0200 |
Author: nevans
Date: 2010-09-03 17:32:39 +0200 (Fri, 03 Sep 2010)
New Revision: 12822
Modified:
gnunet/src/core/gnunet-service-core.c
Log:
niceties
Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c 2010-09-03 15:32:01 UTC (rev
12821)
+++ gnunet/src/core/gnunet-service-core.c 2010-09-03 15:32:39 UTC (rev
12822)
@@ -2243,7 +2243,7 @@
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);
@@ -2367,6 +2367,13 @@
{
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)
{
@@ -2416,14 +2423,20 @@
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,
@@ -3067,7 +3080,7 @@
&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));
@@ -3764,8 +3777,9 @@
#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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12822 - gnunet/src/core,
gnunet <=