From: Mathieu Desnoyers Date: Wed, 11 Jul 2012 22:23:12 +0000 (-0400) Subject: Fix: The session list count should provide unique identifiers X-Git-Tag: v2.1.0-rc1~96 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=e74ecf5ad921a3edccacad4d79deb484cd19b1d5 Fix: The session list count should provide unique identifiers Never decrement it. Reported-by: Amer Alhalabi Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/session.c b/src/bin/lttng-sessiond/session.c index f9d20cc56..d30f4ab19 100644 --- a/src/bin/lttng-sessiond/session.c +++ b/src/bin/lttng-sessiond/session.c @@ -64,14 +64,12 @@ static unsigned int add_session_list(struct ltt_session *ls) * Delete a ltt_session structure to the global list. * * The caller MUST acquire the session list lock before. + * The session list count CANNOT be decremented, as it is used as unique + * identifier for the session in UST app hash table lookups. */ static void del_session_list(struct ltt_session *ls) { cds_list_del(&ls->list); - /* Sanity check */ - if (ltt_session_list.count > 0) { - ltt_session_list.count--; - } } /*