not for 0
authorChristian Grothoff <christian@grothoff.org>
Thu, 20 Oct 2011 11:12:35 +0000 (11:12 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 20 Oct 2011 11:12:35 +0000 (11:12 +0000)
src/ats/ats_api_scheduling.c

index 955b21286f435f9227903fc6e435290252d231cc..075d776e536b324a27c0ea8091b1e26c0451c908 100644 (file)
@@ -344,6 +344,8 @@ remove_session (struct GNUNET_ATS_SchedulingHandle *sh,
                uint32_t session_id,
                const struct GNUNET_PeerIdentity *peer)
 {
+  if (0 == session_id)
+    return;
   GNUNET_assert (session_id < sh->session_array_size);
   GNUNET_assert (GNUNET_YES == sh->session_array[session_id].slot_used);
   GNUNET_assert (0 == memcmp (peer,