From 679eafefb096a7782bfd18a7283548607c9445cb Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 26 Oct 2020 07:56:58 -0500 Subject: Add a pointer --- P2/lib/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 8373a09..507eb0b 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -18,12 +18,13 @@ char *getChunkData(int mapperID) { struct msgBuffer ACK = {mapperID, "ACK"}; msgsnd(mid, (void *) &ACK, MSGSIZE, 0); } + msgctl(mid, IPC_RMID, 0); return message -> msgText; } // sends chunks of size 1024 to the mappers in RR fashion void sendChunkData(char *inputFile, int nMappers) { - struct msgBuffer message; + struct msgBuffer *message; key_t key = 10; int msgid; -- cgit v1.2.3