diff --git a/Labs/Lab4/echod.c b/Labs/Lab4/echod.c index 2aa3bfe3a7e9e9e6b97331db86d21ab5df285a7e..3a1b1ec4ad2bac02e6a29cab16ba71e0821744af 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 c968c6a3b381e3502b65c550767d7e383daad80d..58273646aa00ce0ff9fae4143152a0e351dee759 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