diff options
author | Matt Strapp <strap012@umn.edu> | 2020-10-27 13:27:06 -0500 |
---|---|---|
committer | Matt Strapp <strap012@umn.edu> | 2020-10-27 13:27:06 -0500 |
commit | 4cfca051384e53e2a25e63cfc5f135017c7a64c6 (patch) | |
tree | 9c70fe594177abec6e21bc249221b7d244101dad /P2 | |
parent | Fix missing number of args in line 50 (diff) | |
download | csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar.gz csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar.bz2 csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar.lz csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar.xz csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.tar.zst csci4061-4cfca051384e53e2a25e63cfc5f135017c7a64c6.zip |
Change something
Diffstat (limited to 'P2')
-rw-r--r-- | P2/lib/utils.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |