lttng-sessiond: do not call ustctl_register_done()
authorGerlando Falauto <gerlando.falauto@keymile.com>
Thu, 5 Jan 2012 11:25:29 +0000 (12:25 +0100)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 9 Jan 2012 19:19:35 +0000 (14:19 -0500)
commitf2ca2e251d8f49b0dbbcca529dd61b3562c1147f
treed4ed89e16f65fb182c3edc0a0e4b17a9ab290f81
parentbec399405a4667411ae06bbbcbed678e42e93a30
lttng-sessiond: do not call ustctl_register_done()

When lttng-ust support is not enabled, compilation might fail with:
lttng-tools.git/lttng-sessiond/main.c:1167: undefined reference to
`ustctl_register_done'

Actually when HAVE_LIBLTTNG_UST_CTL is not defined, the function call is
normally optimized out by the compiler because ust_app_register() is a
static inline alway returning a negative value, leaving the call within
unreachable code.

Depending on the compiler version and optimization flags, this may
however not always happen, leading to the above error.

Therefore replace ustctl_register_done() with ustapp_register_done(),
which calls the original function when lttng-ust is enabled, and returns
an error otherwise (it is unreachable code anyway).

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
lttng-sessiond/main.c
lttng-sessiond/ust-app.h
This page took 0.025908 seconds and 4 git commands to generate.