From: Eric Bollengier Date: Mon, 15 Nov 2010 21:57:17 +0000 (+0100) Subject: bweb: return list for output in send_one_cmd() X-Git-Tag: Release-5.2.1~939 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a9df93142b81012f13bda7006f245e0787f6c779;p=bacula%2Fbacula bweb: return list for output in send_one_cmd() --- diff --git a/gui/bweb/lib/Bconsole.pm b/gui/bweb/lib/Bconsole.pm index 52fb40de64..3178126039 100644 --- a/gui/bweb/lib/Bconsole.pm +++ b/gui/bweb/lib/Bconsole.pm @@ -199,7 +199,7 @@ sub before sub send_one_cmd { my ($self, $line) = @_; - my $ret=''; + my @ret; my $cmd = $self->{pref}->{bconsole} ; if ($self->{dir}) { $cmd = $cmd . " -D '$self->{dir}'"; @@ -214,11 +214,11 @@ sub send_one_cmd $l = <$OUT>; # line while ($l = <$OUT>) { - $ret .= $l; + push @ret, $l; } close($OUT); waitpid($pid, 0); - return $ret; + return wantarray? @ret : \@ret; } sub send_cmd