X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-abi.c;h=4fbf15c6543aeb55faf8e433eb2a9fedd6fdc9f3;hb=refs%2Fheads%2Fstable-2.9;hp=762c9017aca96bf35b9971a8dd3b63409f19f2e3;hpb=8e696cfa579df0d75368a36d049e9c99b24e53f4;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 762c9017..4fbf15c6 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -37,6 +37,7 @@ * - Takes instrumentation source specific arguments. */ +#define _LGPL_SOURCE #include #include #include @@ -44,6 +45,7 @@ #include #include #include +#include #include "tracepoint-internal.h" #include #include @@ -513,7 +515,6 @@ int lttng_abi_map_channel(int session_objd, /* error path after channel was created */ objd_error: notransport: - free(lttng_chan); alloc_error: channel_destroy(chan, channel_handle, 0); return ret; @@ -528,7 +529,9 @@ invalid: { int close_ret; + lttng_ust_lock_fd_tracker(); close_ret = close(wakeup_fd); + lttng_ust_unlock_fd_tracker(); if (close_ret) { PERROR("close"); } @@ -573,6 +576,8 @@ long lttng_session_cmd(int objd, unsigned int cmd, unsigned long arg, case LTTNG_UST_SESSION_STOP: case LTTNG_UST_DISABLE: return lttng_session_disable(session); + case LTTNG_UST_SESSION_STATEDUMP: + return lttng_session_statedump(session); default: return -EINVAL; }