%circuit = ();
$total_in = $total_out = 0;
$lastconnect = 0;
-$connectinterval = 60;
+$connectinterval = 30;
sub init
{
return unless $enable;
- $rproc = shift;
+ # only set $rproc if there is something to set rproc from!
+ my $rp = shift;
+ $rproc = $rp if defined $rp;
+
finish();
dbg("AGW initialising and connecting to $addr/$port ...");
my $pid = shift || 0;
my $data = shift || '';
my $len = 0;
+
+ return unless $sock;
$len = length $data;
if ($sort eq 'y' || $sort eq 'H') {
return $circuit{$call};
}
+sub peerhost
+{
+ my $conn = shift;
+ $conn->{peerhost} ||= 'ax25';
+ return $conn->{peerhost};
+}
+
sub connect
{
my ($conn, $line) = @_;