Skip to content
Snippets Groups Projects
Commit b96ab8dd authored by ajf5's avatar ajf5
Browse files

debugging

parent f2b0077e
No related branches found
No related tags found
No related merge requests found
......@@ -152,8 +152,8 @@ void TcpSocket::mergeFiles(string ip, string port, string handler, string filede
if (fp == NULL) printf("Could not open file to send %s.", toProcess[index].c_str());
else {
int sj;
try { sj = stoi(toStart[index+1]); }
catch (...) { cout << "[ERROR] stoi: " << "send file size (" << toStart[index] << toStart[index+1] << ") from " << payload << endl; exit(1);}
try { sj = stoi(toProcess[index+1]); }
catch (...) { cout << "[ERROR] stoi: " << "send file size (" << toProcess[index] << toProcess[index+1] << ") from " << payload << endl; exit(1);}
sendFile(sockfd, fp, sj);
fclose(fp);
}
......
......@@ -51,7 +51,7 @@ void *runTcpSender(void *tcpSocket)
if (overwritefilename.compare("") != 0) localfilename = overwritefilename;
string header = sdfsfilename + "," + msgSplit[1];
string toSend = msgSplit[1] + "," + to_string(size);
cout << "[DEBUG] " << toSend << endl;
//cout << "[DEBUG] " << toSend << endl;
string forwardMsg = msgSplit[0] + "::" + to_string(PUTACK) + "::" + localfilename + "::" + header + "::" + toSend + "::";
tcp->pendSendMessages.pop();
tcp->mergeMessages.push(forwardMsg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment