Skip to content
Snippets Groups Projects
Unverified Commit 1db4f10d authored by Andrea Orlati's avatar Andrea Orlati Committed by GitHub
Browse files

fix issue #610: command composition now works properly when parser is dealing...

fix issue #610: command composition now works properly when parser is dealing with system calls (#617)
parent 1c3fb1eb
No related branches found
No related tags found
No related merge requests found
...@@ -100,6 +100,7 @@ IRA::CString CParser<OBJ>::executeCommand(const IRA::CString& command,IRA::CStri ...@@ -100,6 +100,7 @@ IRA::CString CParser<OBJ>::executeCommand(const IRA::CString& command,IRA::CStri
IRA::CString answer(""); IRA::CString answer("");
composeCall+=elem->m_syscall; composeCall+=elem->m_syscall;
for (WORD k=0;k<parNum;k++) { for (WORD k=0;k<parNum;k++) {
composeCall+=" ";
if (inParams[k]==IRA::CString(_SP_JOLLYCHARACTER)) { if (inParams[k]==IRA::CString(_SP_JOLLYCHARACTER)) {
composeCall+=_SP_JOLLYCHARACTER_REPLACEMENT; composeCall+=_SP_JOLLYCHARACTER_REPLACEMENT;
} }
...@@ -107,6 +108,7 @@ IRA::CString CParser<OBJ>::executeCommand(const IRA::CString& command,IRA::CStri ...@@ -107,6 +108,7 @@ IRA::CString CParser<OBJ>::executeCommand(const IRA::CString& command,IRA::CStri
composeCall+=inParams[k]; composeCall+=inParams[k];
} }
} }
printf("call: %s\n",(const char *)composeCall);
/*if (system((const char *)composeCall)<0) { /*if (system((const char *)composeCall)<0) {
_EXCPT(ParserErrors::SystemCommandErrorExImpl,err,"CParser::executeCommand()"); _EXCPT(ParserErrors::SystemCommandErrorExImpl,err,"CParser::executeCommand()");
err.setSystemCommand((const char *)composeCall); err.setSystemCommand((const char *)composeCall);
......
...@@ -190,7 +190,7 @@ int main(int argc, char *argv[]) ...@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
parser.add("naviga","firefox",0); parser.add("naviga","firefox",0);
parser.add("terminale","xterm -title ",1); parser.add("terminale","xterm -title",2);
parser.add("remoteok","extern",0,&CTest::remoteCall); parser.add("remoteok","extern",0,&CTest::remoteCall);
parser.add("remotefail","extern",1,&CTest::remoteCall); parser.add("remotefail","extern",1,&CTest::remoteCall);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment