753 |
// only if the other side is the LSCP shell application: |
// only if the other side is the LSCP shell application: |
754 |
// check the current (incomplete) command line for syntax errors, |
// check the current (incomplete) command line for syntax errors, |
755 |
// possible completions and report everything back to the shell |
// possible completions and report everything back to the shell |
756 |
if ((*iter).bShellInteract) { |
if ((*iter).bShellInteract || (*iter).bShellAutoCorrect) { |
757 |
String s = lscpParserProcessShellInteraction(bufferedCommands[socket], &(*iter)); |
String s = lscpParserProcessShellInteraction(bufferedCommands[socket], &(*iter)); |
758 |
if (!s.empty()) AnswerClient(s + "\n"); |
if (!s.empty() && (*iter).bShellInteract) AnswerClient(s + "\n"); |
759 |
} |
} |
760 |
} |
} |
761 |
#if defined(WIN32) |
#if defined(WIN32) |
4006 |
else throw Exception("Not a boolean value, must either be 0 or 1"); |
else throw Exception("Not a boolean value, must either be 0 or 1"); |
4007 |
} catch (Exception e) { |
} catch (Exception e) { |
4008 |
result.Error(e); |
result.Error(e); |
4009 |
|
} |
4010 |
|
return result.Produce(); |
4011 |
|
} |
4012 |
|
|
4013 |
|
String LSCPServer::SetShellAutoCorrect(yyparse_param_t* pSession, double boolean_value) { |
4014 |
|
dmsg(2,("LSCPServer: SetShellAutoCorrect(val=%f)\n", boolean_value)); |
4015 |
|
LSCPResultSet result; |
4016 |
|
try { |
4017 |
|
if (boolean_value == 0) pSession->bShellAutoCorrect = false; |
4018 |
|
else if (boolean_value == 1) pSession->bShellAutoCorrect = true; |
4019 |
|
else throw Exception("Not a boolean value, must either be 0 or 1"); |
4020 |
|
} catch (Exception e) { |
4021 |
|
result.Error(e); |
4022 |
} |
} |
4023 |
return result.Produce(); |
return result.Produce(); |
4024 |
} |
} |