aboutsummaryrefslogtreecommitdiffstats
path: root/P2
diff options
context:
space:
mode:
Diffstat (limited to 'P2')
-rw-r--r--P2/lib/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index 98239d5..7d85c84 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -14,7 +14,8 @@ char *getChunkData(int mapperID) {
}
msgrcv(mid, (void *) &message, MSGSIZE, mapperID, 0);
if (strcmp("END", message -> msgText)) {
- msgsnd(mid, (void *) "ACK", 3, 0);
+ struct msgBuffer ACK = {mapperID, "ACK"};
+ msgsnd(mid, (void *) &ACK, MSGSIZE, 0);
}
char* returnValue = message -> msgText;
return returnValue;