my ($min, $hour, $mday, $month, $wday, $cmd) = /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$/o;
next unless defined $min;
my $ref = bless {};
- my $err;
+ my $err = '';
if (defined $min && defined $hour && defined $cmd) { # it isn't all of them, but should be enough to tell if this is a real line
$err .= parse($ref, 'min', $min, 0, 60);
my $_isdbg; # current dbg level we are processing
-sub dbg($)
+sub dbg
{
# return unless $fp;
my $t = time;
my $r = $_;
chomp $r;
my @l = split /\n/, $r;
- for (@l) {
- s/([\x00-\x08\x0B-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
- print "$_\n" if defined \*STDOUT && !$no_stdout;
- my $tag = $_isdbg ? "($_isdbg) " : '';
- my $str = "$t^$tag$_";
+ foreach my $l (@l) {
+ $l =~ s/([\x00-\x08\x0B-\x1f\x7f-\xff])/sprintf("%%%02X",ord($1))/eg;
+ print "$l\n" if defined \*STDOUT && !$no_stdout;
+ my $tag = $_isdbg ? "($_isdbg) " : '(*) ';
+ my $str = "$t^$tag$l";
&$callback($str) if $callback;
if ($dbgringlth) {
shift @dbgring while (@dbgring > $dbgringlth);
our $readback = `which tac`;
chomp $readback;
+undef $readback; # yet another reason not to use the cloud!
+
use strict;
$sock->start;
$conn->{peerhost} = $handle->peerhost;
$conn->{peerhost} =~ s|^::ffff:||; # chop off leading pseudo IPV6 stuff on dual stack listeners
- $conn->{peerport} = $handle->peerport;
+ $conn->{peerport} = $handle->peerport || 0;
dbg((ref $conn) . " accept $conn->{cnum} from $conn->{peerhost}:$conn->{peerport}") if isdbg('conn') || isdbg('connect');
my ($rproc, $eproc) = &{$server_conn->{rproc}} ($conn, $conn->{peerhost}, $conn->{peerport});
$conn->{sort} = 'Incoming';
my \@s = split /\\^/;
$checkfilter;
push \@spots, \\\@s;
+ shift \@spots if \@spots > $to + 2;
}
my \$c;
my \$ref;
if ($desc) {
my ($v, $s, $b, $g) = $desc =~ /^([\d.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/;
$s ||= '';
- dbg("Git: $desc");
- dbg("Git: V=$v S=$s B=$b g=$g");
+ dbg("Git: $desc") if isdbg('git');
+ dbg("Git: V=$v S=$s B=$b g=$g") if isdbg('git');
$version = $v;
$build = $b || 0;
$gitversion = "$g\[r]";