connected command to execute command in receiver pc

This commit is contained in:
2018-10-10 12:23:55 +02:00
parent 5e7e7d3c33
commit b981fe78ef
6 changed files with 73 additions and 3 deletions

View File

@ -426,7 +426,7 @@ int slsReceiverTCPIPInterface::exec_command() {
sysret=system(cmd);
//should be replaced by popen
if (sysret == 0) {
sprintf(mess,"Succeeded\n");
ret = OK;
} else {
ret = FAIL;
sprintf(mess,"Executing Command failed\n");
@ -436,7 +436,8 @@ int slsReceiverTCPIPInterface::exec_command() {
// send answer
mySock->SendDataOnly(&ret,sizeof(ret));
mySock->SendDataOnly(mess,MAX_STR_LENGTH);
if (ret == FAIL)
mySock->SendDataOnly(mess,MAX_STR_LENGTH);
// return ok/fail
return ret;