aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Smith <smit9523@umn.edu>2020-11-03 12:23:04 -0600
committerAndrea Smith <smit9523@umn.edu>2020-11-03 12:23:04 -0600
commitec1487ec0032d117aec02c229c9f824b4e9369e8 (patch)
treed6edc673e3423ceddc2baf90b572f4fd650f59ad
parentchange args (diff)
downloadcsci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar.gz
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar.bz2
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar.lz
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar.xz
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.tar.zst
csci4061-ec1487ec0032d117aec02c229c9f824b4e9369e8.zip
test
Diffstat (limited to '')
-rw-r--r--P2/lib/utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index 180949d..f1c2472 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -21,15 +21,15 @@ char *getChunkData(int mapperID) {
struct msgBuffer message = makeMessage();
//Queue ID
int mid = openQueue();
- printf("MAPPER ID:%d\n", mapperID);
+ //printf("MAPPER ID:%d\n", mapperID);
msgrcv(mid, &message, MSGSIZE, mapperID, 0);
- // printf("\n%s\n", message.msgText);
+ printf("\n%s\n", message.msgText);
// printf("%d\n", strncmp("END", message.msgText, 3));
if (strncmp("END", message.msgText, 4) == 0)
return NULL;
char* value = message.msgText;
// printf("%s\n", message.msgText);
- printf("RECEIVED CHUNK:%s\nRECEIVED VALUE:%ld\n", value, message.msgType);
+ //printf("RECEIVED CHUNK:%s\nRECEIVED VALUE:%ld\n", value, message.msgType);
return value;
//return &(message.msgText);
}
@@ -53,7 +53,7 @@ void sendChunkData(char *inputFile, int nMappers) {
fseek(file, (i - 1023), SEEK_CUR);
message.msgType = (map++ % nMappers) + 1;
- printf("SENT CHUNK: %s\nSENT CHUNK MAPPER: %ld\n",message.msgText, message.msgType);
+ //printf("SENT CHUNK: %s\nSENT CHUNK MAPPER: %ld\n",message.msgText, message.msgType);
msgsnd(msgid, &message, MSGSIZE, 0);
}