Skip to content

Commit

Permalink
Enable command splitter for anything not explicitly flagging kMSRunShell
Browse files Browse the repository at this point in the history
This alters the MythSystem(QString, uint) constructor to automatically
parse any commands passed through it that do not explicitly set the
kMSRunShell flag.  A quick run through the code does not turn up any
instances where this is currently the case, so the code should remain
effectively unused for now.  Individual MythSystem users and the block
of myth_system() calls will need to be tested individually with this
path to debug the parser.

Ref #10860
  • Loading branch information
wagnerrp committed May 3, 2012
1 parent c877947 commit e229f68
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion mythtv/libs/libmythbase/mythsystem.cpp
Expand Up @@ -63,7 +63,23 @@ MythSystem::MythSystem(const QString &command, uint flags)
*/
void MythSystem::SetCommand(const QString &command, uint flags)
{
SetCommand(command, QStringList(), flags | kMSRunShell);
if (flags & kMSRunShell)
SetCommand(command, QStringList(), flags);
else
{
QString abscommand;
QStringList args;
if (!d->ParseShell(command, abscommand, args))
{
LOG(VB_GENERAL, LOG_ERR,
QString("MythSystem(%1) command not understood")
.arg(command));
m_status = GENERIC_EXIT_INVALID_CMDLINE;
return;
}

SetCommand(abscommand, args, flags);
}
}


Expand Down

0 comments on commit e229f68

Please sign in to comment.