From: Christian Grothoff Date: Wed, 11 Feb 2015 16:16:14 +0000 (+0000) Subject: -check for in_destroy when looking up session IDs X-Git-Tag: initial-import-from-subversion-38251~2353 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=567ca9a20a7afe3573cb1c11ad89c116a0650fe7;p=oweals%2Fgnunet.git -check for in_destroy when looking up session IDs --- diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index a0a196d1a..c1a80eb0a 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c @@ -307,6 +307,7 @@ find_session_id (struct GNUNET_ATS_SchedulingHandle *sh, } for (i = 1; i < sh->session_array_size; i++) if ( (NULL != sh->session_array[i]) && + (GNUNET_NO == sh->session_array[i]->in_destroy) && ( (session == sh->session_array[i]->session) || (NULL == sh->session_array[i]->session) ) && (0 == GNUNET_HELLO_address_cmp (address, @@ -397,7 +398,9 @@ process_ats_address_suggestion_message (void *cls, force_reconnect (sh); return; } - ar = find_session (sh, session_id, &m->peer); + ar = find_session (sh, + session_id, + &m->peer); if (NULL == ar) { GNUNET_break (0); @@ -730,7 +733,7 @@ int GNUNET_ATS_address_del_session (struct GNUNET_ATS_AddressRecord *ar, struct Session *session) { - GNUNET_break (session == ar->session); + GNUNET_assert (session == ar->session); ar->session = NULL; if (GNUNET_HELLO_address_check_option (ar->address, GNUNET_HELLO_ADDRESS_INFO_INBOUND))