gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17560 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r17560 - gnunet/src/transport
Date: Mon, 17 Oct 2011 22:08:14 +0200

Author: grothoff
Date: 2011-10-17 22:08:14 +0200 (Mon, 17 Oct 2011)
New Revision: 17560

Modified:
   gnunet/src/transport/plugin_transport_tcp.c
Log:
more assertions

Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2011-10-17 20:02:25 UTC (rev 
17559)
+++ gnunet/src/transport/plugin_transport_tcp.c 2011-10-17 20:08:14 UTC (rev 
17560)
@@ -1127,6 +1127,18 @@
     /* check if session is valid */
     struct Session *ses = plugin->sessions;
 
+    if (0 != memcmp (target,
+                    &session->target,
+                    sizeof (struct GNUNET_PeerIdentity)))
+    {
+      GNUNET_break (0);
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                 "Got session for `%s', but should be for peer `%s'!\n",
+                 GNUNET_i2s (&session->target),
+                 GNUNET_h2s (&target->hashPubKey));
+      return -1;
+    }
+
     while ((ses != NULL) && (ses != session))
       ses = ses->next;
     if (ses == NULL)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]