aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_tcp.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-23 22:31:43 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-23 22:31:43 +0000
commite4b5a6b681d196cb233bf15a91060e3585933aa1 (patch)
tree882df975f2295b6a0ab6ad6a5a26b52b72d6d48d /src/transport/plugin_transport_tcp.c
parent4029c07550295659b391220324f348f4b1a86381 (diff)
downloadgnunet-e4b5a6b681d196cb233bf15a91060e3585933aa1.tar.gz
gnunet-e4b5a6b681d196cb233bf15a91060e3585933aa1.zip
-LRN: Check session target:
It changes the Session object layout to make peer identity its first field, always, for all sessions. Code in find_session() can use this to check that the session belongs to the right peer. test_ats_api_add_address always triggers this due to the way it fakes a pointer to session object.
Diffstat (limited to 'src/transport/plugin_transport_tcp.c')
-rw-r--r--src/transport/plugin_transport_tcp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index a42621569..007e87f93 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -223,6 +223,11 @@ struct PendingMessage
223 */ 223 */
224struct Session 224struct Session
225{ 225{
226 /**
227 * To whom are we talking to (set to our identity
228 * if we are still waiting for the welcome message)
229 */
230 struct GNUNET_PeerIdentity target;
226 231
227 /** 232 /**
228 * API requirement. 233 * API requirement.
@@ -262,12 +267,6 @@ struct Session
262 struct GNUNET_SERVER_TransmitHandle *transmit_handle; 267 struct GNUNET_SERVER_TransmitHandle *transmit_handle;
263 268
264 /** 269 /**
265 * To whom are we talking to (set to our identity
266 * if we are still waiting for the welcome message)
267 */
268 struct GNUNET_PeerIdentity target;
269
270 /**
271 * ID of task used to delay receiving more to throttle sender. 270 * ID of task used to delay receiving more to throttle sender.
272 */ 271 */
273 GNUNET_SCHEDULER_TaskIdentifier receive_delay_task; 272 GNUNET_SCHEDULER_TaskIdentifier receive_delay_task;