$mode = 'r' if !$mode;
$self->{mode} = $mode;
- my $fh = new FileHandle $self->{fn}, $mode;
+ my $fh = new FileHandle $self->{fn}, $mode, 0666;
return undef if !$fh;
$fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable
$self->{fh} = $fh;
}
if ($clref && !grep { $clref->{dxchan} == $_ } DXCommandmode::get_all) {
$dxchan = $clref->{dxchan};
- $ref->start_msg($dxchan) if $clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
+ $ref->start_msg($dxchan) if $dxchan && $clref && !get_busy($dxchan->call) && $dxchan->state eq 'normal';
}
}
} elsif (!$sort) {