aboutsummaryrefslogtreecommitdiffstats
path: root/P2/lib
diff options
context:
space:
mode:
authorAndrea Smith <smit9523@umn.edu>2020-11-02 21:35:06 -0600
committerAndrea Smith <smit9523@umn.edu>2020-11-02 21:35:06 -0600
commit5ebe931b2879652874e642c9a8f209334a920259 (patch)
tree9707c3495e3028d566a424f9d067ad017fcbfa82 /P2/lib
parentstill doesn't work (diff)
downloadcsci4061-5ebe931b2879652874e642c9a8f209334a920259.tar
csci4061-5ebe931b2879652874e642c9a8f209334a920259.tar.gz
csci4061-5ebe931b2879652874e642c9a8f209334a920259.tar.bz2
csci4061-5ebe931b2879652874e642c9a8f209334a920259.tar.lz
csci4061-5ebe931b2879652874e642c9a8f209334a920259.tar.xz
csci4061-5ebe931b2879652874e642c9a8f209334a920259.tar.zst
csci4061-5ebe931b2879652874e642c9a8f209334a920259.zip
Fixed sendChunkData?
Diffstat (limited to '')
-rw-r--r--P2/lib/utils.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c
index e0f087e..fa9c235 100644
--- a/P2/lib/utils.c
+++ b/P2/lib/utils.c
@@ -40,13 +40,14 @@ void sendChunkData(char *inputFile, int nMappers) {
while(fgets(message.msgText, chunkSize + 1, file) != NULL) {
// TODO! help
- int i = 1024;
- while(validChar(message.msgText[i])) {
- message.msgText[i] == '\0';
+ int i = 1023;
+ while((validChar(message.msgText[i]) )) {
+ message.msgText[i] = '\0';
i--;
- // printf("%d\n", i);
}
- fseek(file, (i - 1024), SEEK_CUR);
+ printf("%d\n", validChar(message.msgText[i]));
+ printf("test\n");
+ fseek(file, (i - 1023), SEEK_CUR);
printf("%s\n", message.msgText);
message.msgType = (map++ % nMappers) + 1 ;
//THIS IS DEBUG, NOT ACTUALLY FUNCTIONAL (like at all)