mirror of
https://github.com/meganz/MEGAcmd
synced 2025-08-22 09:57:09 +00:00
log messages in cerr & cout
This commit is contained in:
parent
7e4db800d3
commit
4bf91ff422
@ -539,6 +539,8 @@ int main(int argc, char* argv[])
|
||||
int outcode = comms->executeCommand(parsedArgs, readresponse, COUT, false);
|
||||
#endif
|
||||
|
||||
cerr << "COMMAND EXECUTED. Closing client app" << endl;
|
||||
cout << "COUT: COMMAND EXECUTED. Closing client app" << endl;
|
||||
delete comms;
|
||||
|
||||
// do always return positive error codes (POSIX compliant)
|
||||
|
@ -780,6 +780,8 @@ int MegaCmdShellCommunications::executeCommand(string command, std::string (*rea
|
||||
char buffer[1025];
|
||||
do{
|
||||
n = recv(newsockfd, buffer, BUFFERSIZE, MSG_NOSIGNAL);
|
||||
cerr << "read output from server n=" << n << endl;
|
||||
cout << "COUT: read output from server n=" << n << endl;
|
||||
if (n)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
@ -803,6 +805,9 @@ int MegaCmdShellCommunications::executeCommand(string command, std::string (*rea
|
||||
return -1;;
|
||||
}
|
||||
|
||||
cerr << " after received all bytes. last n=" << n << endl;
|
||||
cout << "COUT: after received all bytes. last n=" << n << endl;
|
||||
|
||||
closeSocket(newsockfd);
|
||||
closeSocket(thesock);
|
||||
return outcode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user