sh->reconnect = GNUNET_YES;
return NULL;
}
+ /* This check exploits the fact that first field of a session object
+ * is peer identity.
+ */
+ if (0 !=
+ memcmp (peer, sh->session_array[session_id].session,
+ sizeof (struct GNUNET_PeerIdentity)))
+ {
+ GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "ats-scheduling-api",
+ "Session %p belongs to peer `%s'\n",
+ sh->session_array[session_id].session, GNUNET_i2s_full ((struct GNUNET_PeerIdentity *)sh->session_array[session_id].session));
+/*
+ GNUNET_break (0);
+ sh->reconnect = GNUNET_YES;
+ return NULL;
+*/
+ }
return sh->session_array[session_id].session;
}
*/
struct Session
{
+ /**
+ * To whom are we talking to
+ */
+ struct GNUNET_PeerIdentity target;
/**
* Stored in a linked list.
*/
uint32_t ats_address_network_type;
- /**
- * To whom are we talking to
- */
- struct GNUNET_PeerIdentity target;
-
/**
* next pointer for double linked list
*/
*/
struct Session
{
+ /**
+ * To whom are we talking to (set to our identity
+ * if we are still waiting for the welcome message)
+ */
+ struct GNUNET_PeerIdentity target;
/**
* API requirement.
*/
struct GNUNET_SERVER_TransmitHandle *transmit_handle;
- /**
- * To whom are we talking to (set to our identity
- * if we are still waiting for the welcome message)
- */
- struct GNUNET_PeerIdentity target;
-
/**
* ID of task used to delay receiving more to throttle sender.
*/
*/
struct Session
{
+ /**
+ * To whom are we talking to (set to our identity
+ * if we are still waiting for the welcome message)
+ */
+ struct GNUNET_PeerIdentity sender;
/**
* Stored in a linked list.
*/
void *transmit_cont_cls;
- /**
- * To whom are we talking to (set to our identity
- * if we are still waiting for the welcome message)
- */
- struct GNUNET_PeerIdentity sender;
-
/**
* At what time did we reset last_received last?
*/
struct Session
{
+ struct GNUNET_PeerIdentity target;
+
void *addr;
size_t addrlen;
- struct GNUNET_PeerIdentity target;
/**
* Session timeout task
*/
struct Session
{
+ /**
+ * To whom are we talking to (set to our identity
+ * if we are still waiting for the welcome message)
+ */
+ struct GNUNET_PeerIdentity target;
/**
* API requirement (must be first).
*/
struct PendingMessage *pending_message_tail;
- /**
- * To whom are we talking to (set to our identity
- * if we are still waiting for the welcome message)
- */
- struct GNUNET_PeerIdentity target;
-
/**
* When should this session time out?
*/