From 1e65ffb4feac27c3f2055bd0fcec72e4ecfce69c Mon Sep 17 00:00:00 2001
From: afederici <ajf5@illinois.edu>
Date: Wed, 18 Nov 2020 21:55:12 -0600
Subject: [PATCH] bug fix

---
 src/Node.cpp    | 3 +--
 src/Threads.cpp | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Node.cpp b/src/Node.cpp
index 7e8e7de..f3d9711 100644
--- a/src/Node.cpp
+++ b/src/Node.cpp
@@ -873,8 +873,7 @@ void Node::handleTcpMessage()
 			}
 
 			case CHUNK: {
-				cout << "[CHUNK] " << "we will put sdfsfilename: " << inMsg[2] << " from chunk: " << inMsg[3];
-				cout << " to node " << inMsg[0] << endl;
+				cout << "[CHUNK] " << "we will put sdfsfilename: " << inMsg[2] << " from chunk: " << inMsg[3] << " to node " << inMsg[0] << endl;
 				int end = stoi(inMsg[3]) + T_maples;
 				string sendMsg = msg.payload + "::" + to_string(end);
 				this->tcpServent->pendSendMessages.push(sendMsg);
diff --git a/src/Threads.cpp b/src/Threads.cpp
index df5a71f..bda88a9 100644
--- a/src/Threads.cpp
+++ b/src/Threads.cpp
@@ -29,7 +29,7 @@ void *runTcpSender(void *tcpSocket)
 		}
 		while (!tcp->pendSendMessages.empty()) {
 			vector<string> msgSplit = splitString(tcp->pendSendMessages.front(), "::");
-			if (msgSplit.size() == 5) {
+			if (msgSplit.size() >= 5) {
 				string nodeIP = msgSplit[0], localfilename = msgSplit[1], overwrite = msgSplit[4];
 				string sdfsfilename = msgSplit[2], remoteLocalfilename = msgSplit[3];
 				cout << "[DOSEND] nodeIP " << nodeIP << ", localfilename " << localfilename;
-- 
GitLab