projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Apply policy on channel sampling
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index 001abffcd925705fbcee43a613ed055e2cea50c7..1c51eedc7814ff4879a844303b280200ae2e6fe2 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-211,6
+211,8
@@
static int recv_data_sessiond(void *buf, size_t len)
{
int ret;
+ assert(len > 0);
+
if (!connected) {
ret = -LTTNG_ERR_NO_SESSIOND;
goto end;
@@
-219,6
+221,8
@@
static int recv_data_sessiond(void *buf, size_t len)
ret = lttcomm_recv_unix_sock(sessiond_socket, buf, len);
if (ret < 0) {
ret = -LTTNG_ERR_FATAL;
+ } else if (ret == 0) {
+ ret = -LTTNG_ERR_NO_SESSIOND;
}
end:
This page took
0.024706 seconds
and
4
git commands to generate.