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);
|
int outcode = comms->executeCommand(parsedArgs, readresponse, COUT, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
cerr << "COMMAND EXECUTED. Closing client app" << endl;
|
||||||
|
cout << "COUT: COMMAND EXECUTED. Closing client app" << endl;
|
||||||
delete comms;
|
delete comms;
|
||||||
|
|
||||||
// do always return positive error codes (POSIX compliant)
|
// do always return positive error codes (POSIX compliant)
|
||||||
|
@ -780,6 +780,8 @@ int MegaCmdShellCommunications::executeCommand(string command, std::string (*rea
|
|||||||
char buffer[1025];
|
char buffer[1025];
|
||||||
do{
|
do{
|
||||||
n = recv(newsockfd, buffer, BUFFERSIZE, MSG_NOSIGNAL);
|
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)
|
if (n)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -803,6 +805,9 @@ int MegaCmdShellCommunications::executeCommand(string command, std::string (*rea
|
|||||||
return -1;;
|
return -1;;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cerr << " after received all bytes. last n=" << n << endl;
|
||||||
|
cout << "COUT: after received all bytes. last n=" << n << endl;
|
||||||
|
|
||||||
closeSocket(newsockfd);
|
closeSocket(newsockfd);
|
||||||
closeSocket(thesock);
|
closeSocket(thesock);
|
||||||
return outcode;
|
return outcode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user