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)
commit6c9cc2aba449a320460b9a9665c66f3b32eaeca7
tree134caa65161c2dd88eb73cfb3146de557ac604eb
parenta2fb29a51133de95720cc389121f403c21b25b8f
Fix session list locking

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>
ltt-sessiond/main.c
ltt-sessiond/session.c
ltt-sessiond/session.h
This page took 0.025906 seconds and 4 git commands to generate.