From f78bf72f3196e7786b68c0b649962cf92ceab6a4 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Wed, 8 Nov 2023 19:11:12 -0600 Subject: server: print the client ouput in full do not split Don't split the client output and print line-by-line, just print the full buffer unmodified. This requires fewer steps and the lines will be separated anyway. Signed-off-by: Danny Holman --- server/src/mini-rat.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/mini-rat.c b/server/src/mini-rat.c index 5579201..cdecf7c 100644 --- a/server/src/mini-rat.c +++ b/server/src/mini-rat.c @@ -102,9 +102,7 @@ void run_exec(int sock, const char **argv) { memset(buffer, 0, 4096); read_session(cur_session, buffer, 4096); - char* lines = NULL; - str_split(lines, &buffer, "\r\n"); - dprintf(sock, lines[0]); + dprintf(sock, buffer); free(buffer); } -- cgit v1.2.3