From: Jonathan Rajotte Date: Fri, 7 Sep 2018 19:18:37 +0000 (-0400) Subject: Fix: use LTTNG_VIEWER_ATTACH_UNK to report a closed session X-Git-Tag: v2.11.0-rc2~215 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=44248a33d18f62c52a8579ea6c232279833bb99a;p=lttng-tools.git Fix: use LTTNG_VIEWER_ATTACH_UNK to report a closed session LTTNG_VIEWER_NEW_STREAMS_HUP is not a valid error number for the LTTNG_VIEWER_ATTACH_SESSION command. This result in erroneous error reporting on the client side. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/live.c b/src/bin/lttng-relayd/live.c index 6f50afc6c..bc0e4529a 100644 --- a/src/bin/lttng-relayd/live.c +++ b/src/bin/lttng-relayd/live.c @@ -1089,7 +1089,7 @@ int viewer_attach_session(struct relay_connection *conn) if (closed) { send_streams = 0; response.streams_count = 0; - response.status = htobe32(LTTNG_VIEWER_NEW_STREAMS_HUP); + response.status = htobe32(LTTNG_VIEWER_ATTACH_UNK); goto send_reply; }