@inqueue = (); # the main input queue, an array of hashes
$systime = 0; # the time now (in seconds)
-$version = "1.36"; # the version no of the software
+$version = "1.40"; # the version no of the software
$starttime = 0; # the starting time of the cluster
$lockfn = "cluster.lock"; # lock file name
@outstanding_connects = (); # list of outstanding connects
my ($conn, $msg, $err) = @_;
my $dxchan = DXChannel->get_by_cnum($conn); # get the dxconnnect object for this message
- if (defined $err && $err) {
+ if (!defined $msg || (defined $err && $err)) {
if ($dxchan) {
$dxchan->disconnect;
+ } elsif ($conn) {
+ $conn->disconnect;
}
return;
}
# set up the basic channel info - this needs a bit more thought - there is duplication here
if (!defined $dxchan) {
my ($sort, $call, $line) = $msg =~ /^(\w)(\S+)\|(.*)$/;
- my ($scall, $ssid) = split /-/, $call;
-
- # adjust the callsign if it has an SSID, SSID <= 8 are legal > 8 are netrom connections
- if ($ssid) {
- $ssid = 15 if $ssid > 15;
- if ($ssid > 8) {
- $ssid = 15 - $ssid;
- $call = "$scall-$ssid";
- }
- }
# is there one already connected to me - locally?
my $user = DXUser->get($call);
# this, such as it is, is the main loop!
print "orft we jolly well go ...\n";
dbg('chan', "DXSpider version $version started...");
+
+open(DB::OUT, "|tee /tmp/aa");
+
for (;;) {
my $timenow;
+ $DB::trace = 1;
+
Msg->event_loop(1, 0.1);
$timenow = time;
process_inqueue(); # read in lines from the input queue and despatch them
+ $DB::trace = 0;
# do timed stuff, ongoing processing happens one a second
if ($timenow != $systime) {