Fix: The session list count should provide unique identifiers
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 11 Jul 2012 22:23:12 +0000 (18:23 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 12 Jul 2012 20:00:47 +0000 (16:00 -0400)
Never decrement it.

Reported-by: Amer Alhalabi <amer.alhalabi@ericsson.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/bin/lttng-sessiond/session.c

index bcdd78d50e68b921f47ceb4038311c625aee875d..13abe424c3b1c4472034fbd6be4473c3570abff4 100644 (file)
@@ -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--;
-       }
 }
 
 /*
This page took 0.026072 seconds and 4 git commands to generate.