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:
stan 2003-01-07 13:08:06 +00:00
parent 00ed31cdeb
commit bcee53c274
1 changed files with 10 additions and 5 deletions

View File

@ -155,7 +155,8 @@ if ( !connect( CLIENT, $saddr ) )
my $daemon = shift;
my @args = @_;
my $command = join( ' ', ( $daemon, @args ) );
my $command = $daemon;
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
my $process = $cmd_hash{$command};
if ( !$process )
@ -220,7 +221,8 @@ if ( !connect( CLIENT, $saddr ) )
my $daemon = shift;
my @args = @_;
my $command = "$daemon ".join( ' ', @args );
my $command = $daemon;
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
my $process = $cmd_hash{$command};
if ( !$process )
{
@ -266,7 +268,8 @@ if ( !connect( CLIENT, $saddr ) )
my $daemon = shift;
my @args = @_;
my $command = "$daemon ".join( ' ', @args );
my $command = $daemon;
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
my $process = $cmd_hash{$command};
if ( $process )
{
@ -342,7 +345,8 @@ if ( !connect( CLIENT, $saddr ) )
my $daemon = shift;
my @args = @_;
my $command = "$daemon ".join( ' ', @args );
my $command = $daemon;
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
my $process = $cmd_hash{$command};
if ( !$process )
{
@ -372,7 +376,8 @@ if ( !connect( CLIENT, $saddr ) )
if ( defined($daemon) )
{
my $command = "$daemon ".join( ' ', @args );
my $command = $daemon;
$command .= ' '.join( ' ', ( @args ) ) if ( @args );
my $process = $cmd_hash{$command};
if ( !$process )
{