X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXCommandmode.pm;fp=perl%2FDXCommandmode.pm;h=4212d968b236aaf408288bd09a55930d0a102b8b;hb=7378e3c43c4448328c2e7a1842244ef7a48f0fdd;hp=cbba3b79210bf5ebfa0a77f8377ad57ff80816a6;hpb=8efcd7c490c7b5bf4f2190214b992f91a0dfdc9b;p=spider.git diff --git a/perl/DXCommandmode.pm b/perl/DXCommandmode.pm index cbba3b79..4212d968 100644 --- a/perl/DXCommandmode.pm +++ b/perl/DXCommandmode.pm @@ -1328,9 +1328,10 @@ sub spawn_cmd return; } if ($cb) { - $cb->($dxchan, @res); - } else { - return unless @res; + # transform output if required + @res = $cb->($dxchan, @res); + } + if (@res) { if (defined $prefix) { $dxchan->send(map {"$prefix$_"} @res); } else {