commit
eb0e6022d5e2 "Fix: wait for initial statedump before proceeding
to the main program"
introduced a regression when an application interacts with a session
daemon which has 0 session active.
An application linked against lttng-ust started with
LTTNG_UST_REGISTER_TIMEOUT=-1 hangs forever.
Fix this by decrementing the semaphore if no statedump was requested
when the registration done command is received.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
sock_info->registration_done = 1;
decrement_sem_count(1);
+ if (!sock_info->statedump_pending) {
+ sock_info->initial_statedump_done = 1;
+ decrement_sem_count(1);
+ }
return 0;
}