diff --git a/src/Node.cpp b/src/Node.cpp index 7e8e7deb6142f578d21db37fb07d615060d93ee4..f3d9711d62d832d678f12fc12fbbed1e0caef65c 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 df5a71fd095da75a85dc441ee64019a4d027ee18..bda88a928b02e68f886b2ff3f4953cd1c130ea7a 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;