diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-23 22:31:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-23 22:31:43 +0000 |
commit | e4b5a6b681d196cb233bf15a91060e3585933aa1 (patch) | |
tree | 882df975f2295b6a0ab6ad6a5a26b52b72d6d48d /src/transport/plugin_transport_tcp.c | |
parent | 4029c07550295659b391220324f348f4b1a86381 (diff) | |
download | gnunet-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.c | 11 |
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 | */ |
224 | struct Session | 224 | struct 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; |