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_wlan.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_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index aed4b2286..c2565a4a8 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -152,6 +152,11 @@ struct PendingMessage | |||
152 | */ | 152 | */ |
153 | struct Session | 153 | struct Session |
154 | { | 154 | { |
155 | /** | ||
156 | * To whom are we talking to (set to our identity | ||
157 | * if we are still waiting for the welcome message) | ||
158 | */ | ||
159 | struct GNUNET_PeerIdentity target; | ||
155 | 160 | ||
156 | /** | 161 | /** |
157 | * API requirement (must be first). | 162 | * API requirement (must be first). |
@@ -186,12 +191,6 @@ struct Session | |||
186 | struct PendingMessage *pending_message_tail; | 191 | struct PendingMessage *pending_message_tail; |
187 | 192 | ||
188 | /** | 193 | /** |
189 | * To whom are we talking to (set to our identity | ||
190 | * if we are still waiting for the welcome message) | ||
191 | */ | ||
192 | struct GNUNET_PeerIdentity target; | ||
193 | |||
194 | /** | ||
195 | * When should this session time out? | 194 | * When should this session time out? |
196 | */ | 195 | */ |
197 | struct GNUNET_TIME_Absolute timeout; | 196 | struct GNUNET_TIME_Absolute timeout; |