Fixed construction of command string to not have trailing space if no arguments.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@254 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
00ed31cdeb
commit
bcee53c274
|
@ -155,7 +155,8 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
my $daemon = shift;
|
my $daemon = shift;
|
||||||
my @args = @_;
|
my @args = @_;
|
||||||
|
|
||||||
my $command = join( ' ', ( $daemon, @args ) );
|
my $command = $daemon;
|
||||||
|
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
|
||||||
my $process = $cmd_hash{$command};
|
my $process = $cmd_hash{$command};
|
||||||
|
|
||||||
if ( !$process )
|
if ( !$process )
|
||||||
|
@ -220,7 +221,8 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
my $daemon = shift;
|
my $daemon = shift;
|
||||||
my @args = @_;
|
my @args = @_;
|
||||||
|
|
||||||
my $command = "$daemon ".join( ' ', @args );
|
my $command = $daemon;
|
||||||
|
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
|
||||||
my $process = $cmd_hash{$command};
|
my $process = $cmd_hash{$command};
|
||||||
if ( !$process )
|
if ( !$process )
|
||||||
{
|
{
|
||||||
|
@ -266,7 +268,8 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
my $daemon = shift;
|
my $daemon = shift;
|
||||||
my @args = @_;
|
my @args = @_;
|
||||||
|
|
||||||
my $command = "$daemon ".join( ' ', @args );
|
my $command = $daemon;
|
||||||
|
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
|
||||||
my $process = $cmd_hash{$command};
|
my $process = $cmd_hash{$command};
|
||||||
if ( $process )
|
if ( $process )
|
||||||
{
|
{
|
||||||
|
@ -342,7 +345,8 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
my $daemon = shift;
|
my $daemon = shift;
|
||||||
my @args = @_;
|
my @args = @_;
|
||||||
|
|
||||||
my $command = "$daemon ".join( ' ', @args );
|
my $command = $daemon;
|
||||||
|
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
|
||||||
my $process = $cmd_hash{$command};
|
my $process = $cmd_hash{$command};
|
||||||
if ( !$process )
|
if ( !$process )
|
||||||
{
|
{
|
||||||
|
@ -372,7 +376,8 @@ if ( !connect( CLIENT, $saddr ) )
|
||||||
|
|
||||||
if ( defined($daemon) )
|
if ( defined($daemon) )
|
||||||
{
|
{
|
||||||
my $command = "$daemon ".join( ' ', @args );
|
my $command = $daemon;
|
||||||
|
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
|
||||||
my $process = $cmd_hash{$command};
|
my $process = $cmd_hash{$command};
|
||||||
if ( !$process )
|
if ( !$process )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue