aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Smith <smit9523@umn.edu>2020-11-03 12:37:27 -0600
committerAndrea Smith <smit9523@umn.edu>2020-11-03 12:37:27 -0600
commitc13351cfe180fc8cc2679e23e346041b3fcf30b2 (patch)
tree0c2ddf4a0e2170e28c977c5dd511c6a7f007b843
parenttest (diff)
downloadcsci4061-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 '')
-rw-r--r--P2/lib/utils.c10
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