From 4cfca051384e53e2a25e63cfc5f135017c7a64c6 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 27 Oct 2020 13:27:06 -0500 Subject: Change something --- P2/lib/utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'P2/lib') diff --git a/P2/lib/utils.c b/P2/lib/utils.c index f6eb522..1a33cd2 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -12,11 +12,11 @@ char *getChunkData(int mapperID) { perror("Cannot open queue.\n"); return NULL; } - msgrcv(mid, &message, MSGSIZE, mapperID, 0); - if (strcmp("END", message.msgText)) { - struct msgBuffer ACK = {mapperID, "ACK"}; - msgsnd(mid, &ACK, MSGSIZE, 0); - } + msgrcv(mid, &message, sizeof(message.msgText), mapperID, 0); + // if (strcmp("END", message.msgText)) { + // struct msgBuffer ACK = {mapperID, "ACK"}; + // msgsnd(mid, &ACK, MSGSIZE, 0); + // } // msgctl(mid, IPC_RMID, 0); return message.msgText; } -- cgit v1.2.3