From a8b0ad6e9c0dae9b3628b99809648c29bd1f55f9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 26 Jun 2021 11:43:34 +0200 Subject: Show REPL communications in both directions --- src/repl-connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/repl-connection.c b/src/repl-connection.c index 7d68d25..dec9486 100644 --- a/src/repl-connection.c +++ b/src/repl-connection.c @@ -101,7 +101,7 @@ static void process_line(const char *line_orig, ReplConnection *repl) int eq_pos; char *line = strip_crap(line_orig); - printf("%p: '%s'\n", repl, line); + printf("%p recv: '%s'\n", repl, line); eq_pos = find_reply(line); if ( eq_pos == 0 ) { free(line); @@ -225,6 +225,7 @@ int repl_send(ReplConnection *repl, const char *line) { GError *error = NULL; GOutputStream *out = g_io_stream_get_output_stream(G_IO_STREAM(repl->conn)); + printf("%p send: %s\n", repl, line); if ( g_output_stream_write(out, line, strlen(line), NULL, &error) == -1 ) { fprintf(stderr, "Couldn't send: %s\n", error->message); return 1; -- cgit v1.2.3