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_template.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_template.c')
-rw-r--r-- | src/transport/plugin_transport_template.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c index d3072627e..10ce0da48 100644 --- a/src/transport/plugin_transport_template.c +++ b/src/transport/plugin_transport_template.c | |||
@@ -54,6 +54,11 @@ struct Plugin; | |||
54 | */ | 54 | */ |
55 | struct Session | 55 | struct Session |
56 | { | 56 | { |
57 | /** | ||
58 | * To whom are we talking to (set to our identity | ||
59 | * if we are still waiting for the welcome message) | ||
60 | */ | ||
61 | struct GNUNET_PeerIdentity sender; | ||
57 | 62 | ||
58 | /** | 63 | /** |
59 | * Stored in a linked list. | 64 | * Stored in a linked list. |
@@ -83,12 +88,6 @@ struct Session | |||
83 | void *transmit_cont_cls; | 88 | void *transmit_cont_cls; |
84 | 89 | ||
85 | /** | 90 | /** |
86 | * To whom are we talking to (set to our identity | ||
87 | * if we are still waiting for the welcome message) | ||
88 | */ | ||
89 | struct GNUNET_PeerIdentity sender; | ||
90 | |||
91 | /** | ||
92 | * At what time did we reset last_received last? | 91 | * At what time did we reset last_received last? |
93 | */ | 92 | */ |
94 | struct GNUNET_TIME_Absolute last_quota_update; | 93 | struct GNUNET_TIME_Absolute last_quota_update; |