aboutsummaryrefslogtreecommitdiffstats
path: root/P2
diff options
context:
space:
mode:
Diffstat (limited to 'P2')
-rw-r--r--P2/lib/utils.c10
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;
}