aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-17 20:08:14 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-17 20:08:14 +0000
commit0417487e26a50ea8a319715ee29c0fd5a617711e (patch)
tree00a0733ccdd4785b97f1345d38a72e6776c10fd1 /src/transport/plugin_transport_tcp.c
parenta2447daa59527a205a3b066cc96ebd95d864fc09 (diff)
downloadgnunet-0417487e26a50ea8a319715ee29c0fd5a617711e.tar.gz
gnunet-0417487e26a50ea8a319715ee29c0fd5a617711e.zip
more assertions
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 7c724f532..e2fc413ea 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1127,6 +1127,18 @@ tcp_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
1127 /* check if session is valid */ 1127 /* check if session is valid */
1128 struct Session *ses = plugin->sessions; 1128 struct Session *ses = plugin->sessions;
1129 1129
1130 if (0 != memcmp (target,
1131 &session->target,
1132 sizeof (struct GNUNET_PeerIdentity)))
1133 {
1134 GNUNET_break (0);
1135 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1136 "Got session for `%s', but should be for peer `%s'!\n",
1137 GNUNET_i2s (&session->target),
1138 GNUNET_h2s (&target->hashPubKey));
1139 return -1;
1140 }
1141
1130 while ((ses != NULL) && (ses != session)) 1142 while ((ses != NULL) && (ses != session))
1131 ses = ses->next; 1143 ses = ses->next;
1132 if (ses == NULL) 1144 if (ses == NULL)