diff options
author | Andrea Smith <smit9523@umn.edu> | 2020-11-03 12:37:27 -0600 |
---|---|---|
committer | Andrea Smith <smit9523@umn.edu> | 2020-11-03 12:37:27 -0600 |
commit | c13351cfe180fc8cc2679e23e346041b3fcf30b2 (patch) | |
tree | 0c2ddf4a0e2170e28c977c5dd511c6a7f007b843 /P2 | |
parent | test (diff) | |
download | csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar.gz csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar.bz2 csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar.lz csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar.xz csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.tar.zst csci4061-c13351cfe180fc8cc2679e23e346041b3fcf30b2.zip |
changed stuff
Diffstat (limited to 'P2')
-rw-r--r-- | P2/lib/utils.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c index f1c2472..788a128 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -28,9 +28,16 @@ char *getChunkData(int mapperID) { if (strncmp("END", message.msgText, 4) == 0) return NULL; char* value = message.msgText; + return value; + + // DEBUG! malloc a buffer/return + // char* value = malloc(1024); // chunkSize or MSGSIZE? + // return value; + // Free memory + // printf("%s\n", message.msgText); //printf("RECEIVED CHUNK:%s\nRECEIVED VALUE:%ld\n", value, message.msgType); - return value; + //return &(message.msgText); } @@ -39,6 +46,7 @@ void sendChunkData(char *inputFile, int nMappers) { struct msgBuffer message = makeMessage(); // open message queue int msgid = openQueue(); + // DEBUG! Remove if already exists when opening queue for the first time int map = 0; FILE* file = fopen(inputFile, "r"); // construct chunks of 1024 bytes |