From e4b5a6b681d196cb233bf15a91060e3585933aa1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 23 Jun 2012 22:31:43 +0000 Subject: -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. --- src/transport/plugin_transport_http.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/transport/plugin_transport_http.h') diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h index 986d7d797..dc0f8bb01 100644 --- a/src/transport/plugin_transport_http.h +++ b/src/transport/plugin_transport_http.h @@ -339,6 +339,10 @@ struct ServerConnection */ struct Session { + /** + * To whom are we talking to + */ + struct GNUNET_PeerIdentity target; /** * Stored in a linked list. @@ -370,11 +374,6 @@ struct Session */ uint32_t ats_address_network_type; - /** - * To whom are we talking to - */ - struct GNUNET_PeerIdentity target; - /** * next pointer for double linked list */ -- cgit v1.2.3