X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fchannel.c;h=3d48babb728351b3c05489b370419afbab415e6d;hb=491d15395b58df09f8a3e7ba7404eb1f46392b79;hp=75a911f2af3ec7080085c648792d23393f82ad1c;hpb=a58c490f0bff52a73717d31d04d1472629180de2;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/channel.c b/src/lib/lttng-ctl/channel.c index 75a911f2a..3d48babb7 100644 --- a/src/lib/lttng-ctl/channel.c +++ b/src/lib/lttng-ctl/channel.c @@ -81,7 +81,9 @@ int receive_message(struct lttng_notification_channel *channel) end: return ret; error: - lttng_dynamic_buffer_set_size(&channel->reception_buffer, 0); + if (lttng_dynamic_buffer_set_size(&channel->reception_buffer, 0)) { + ret = -1; + } goto end; } @@ -442,7 +444,7 @@ int handshake(struct lttng_notification_channel *channel) pthread_mutex_lock(&channel->lock); - ret = lttcomm_send_unix_sock(channel->socket, send_buffer, + ret = lttcomm_send_creds_unix_sock(channel->socket, send_buffer, sizeof(send_buffer)); if (ret < 0) { goto end_unlock;