From 1f110eaa3d77676b30b703875299436b6341b2dd Mon Sep 17 00:00:00 2001 From: stitchy Date: Thu, 14 Dec 2023 03:17:58 +0000 Subject: [PATCH] please fix --- pads/dec_client.c | 2 +- pads/enc_client.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pads/dec_client.c b/pads/dec_client.c index 4527416..d130c17 100644 --- a/pads/dec_client.c +++ b/pads/dec_client.c @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) { // Get Cyphertext from server memset(buffer, '\0', 70001); - charsRead = recv(socketFD, buffer, 70001, 0); + charsRead = recv(socketFD, buffer, 70001, MSG_WAITALL); if (charsRead < 0) error("CLIENT: ERROR reading from socket"); //printf("strlen3: %ld\n", strlen(buffer) ); diff --git a/pads/enc_client.c b/pads/enc_client.c index 5513ace..151f2e5 100644 --- a/pads/enc_client.c +++ b/pads/enc_client.c @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { // Get Cyphertext from server memset(buffer, '\0', sizeof(buffer)); - charsRead = recv(socketFD, buffer, sizeof(buffer) - 1, 0); + charsRead = recv(socketFD, buffer, 70001, MSG_WAITALL); //printf("%d\n", charsRead); if (charsRead < 0) error("CLIENT: ERROR reading from socket");