From 18c34a76f8214edf2ac98e6c40b187302afd7a37 Mon Sep 17 00:00:00 2001 From: cdf009 Date: Tue, 25 Sep 2018 16:53:28 -0400 Subject: [PATCH] help2 --- Labs/Lab4/echod.c | 4 ++-- Labs/Lab4/echoreq.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Labs/Lab4/echod.c b/Labs/Lab4/echod.c index 2aa3bfe..3a1b1ec 100644 --- a/Labs/Lab4/echod.c +++ b/Labs/Lab4/echod.c @@ -130,13 +130,13 @@ main (int argc, char* argv[]) { // receive the string sent by client strcpy(in_msg, ""); - recv(sd2, in_msg, BUFFER_SIZE, 0); + recv(sd2, &in_msg, BUFFER_SIZE, 0); printf("done"); // send the received string back to client //send(sd, buf, len flags); - send(sd2, in_msg, BUFFER_SIZE, 0); + send(sd2, &in_msg, BUFFER_SIZE, 0); close(sd2); } diff --git a/Labs/Lab4/echoreq.c b/Labs/Lab4/echoreq.c index c968c6a..5827364 100644 --- a/Labs/Lab4/echoreq.c +++ b/Labs/Lab4/echoreq.c @@ -107,13 +107,13 @@ main(int argc, char* argv[]) { } // send message to server - send(sd, in_msg, BUFFER_SIZE, 0); + send(sd, &in_msg, BUFFER_SIZE, 0); printf("sent"); // send the received string back to client printf("\n"); // //send(sd, buf, len flags); strcpy(in_msg, ""); - recv(sd, in_msg, BUFFER_SIZE, 0); + recv(sd, &in_msg, BUFFER_SIZE, 0); // // receive message echoed back by server -- 2.24.1