[26/38] trace-cmd listen: Add better output on error of connections
diff mbox series

Message ID 20180103175338.546809042@goodmis.org
State New, archived
Headers show
Series
  • trace-cmd: Simplify the msg handling
Related show

Commit Message

Steven Rostedt Jan. 3, 2018, 5:52 p.m. UTC
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

Some of the errors that happen when a client connects to a server have
ambiguous error messages. Clean them up a little.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 trace-listen.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/trace-listen.c b/trace-listen.c
index bd4c2734f181..cfb0f146244d 100644
--- a/trace-listen.c
+++ b/trace-listen.c
@@ -240,7 +240,7 @@  static int process_udp_child(int sfd, const char *host, const char *port,
 		if (r < 0) {
 			if (errno == EINTR)
 				break;
-			pdie("reading client");
+			pdie("reading pages from client");
 		}
 		if (!r)
 			break;
@@ -558,8 +558,10 @@  static int *create_all_readers(int cpus, const char *node, const char *port,
 
 	if (proto_ver == V2_PROTOCOL) {
 		/* send set of port numbers to the client */
-		if (tracecmd_msg_send_port_array(fd, cpus, port_array) < 0)
+		if (tracecmd_msg_send_port_array(fd, cpus, port_array) < 0) {
+			plog("Failed sending port array\n");
 			goto out_free;
+		}
 	} else {
 		/* send the client a comma deliminated set of port numbers */
 		for (cpu = 0; cpu < cpus; cpu++) {