Fix session list locking
authorDavid Goulet <david.goulet@polymtl.ca>
Sun, 17 Jul 2011 16:50:25 +0000 (12:50 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Sun, 17 Jul 2011 16:50:25 +0000 (12:50 -0400)
The session list lock was not used correctly when a client requested the
session list. The session counter and iteration over the list is
protected by a single critical section now.

Move get_lttng_sessions to the main.c in order to remove lttng.h
dependency to session.c/.h and to make easier for the session list
locking.

Remove the get_session_count which is useless since the counter is now
in the session list structure. Access the counter by locking the list
and reading 'count'.

This adds two function to lock and unlock the session list.

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>

No differences found
This page took 0.025883 seconds and 4 git commands to generate.