/spider/local/DXProtVars.pm (copied from /spider/perl). Good for gateways.
13. Despace spot texts properly again for deduping purposes.
14. Corrected Pc84/85 handling a bit.
+15. Sync the user database every 15 secs to see whether we can reduce the
+corruptions and duplicates.
25Jul00=======================================================================
1. ignore \n in ax25 mode for C client.
2. remove extra space at the end of a DX spot announce when no grid square
} else {
route(undef, $to, pc34($main::mycall, $to, $cmd));
}
+ if ($to ne $field[7]) {
+ $to = $field[7];
+ $node = DXCluster->get_exact($to);
+ if ($node && $node->dxchan && $node->dxchan->is_clx) {
+ route(undef, $to, pc84($main::mycall, $to, $main::mycall, $cmd));
+ } else {
+ route(undef, $to, pc34($main::mycall, $to, $cmd));
+ }
+ }
$user->lastoper($main::systime);
$user->put;
}
use DXDebug;
use strict;
-use vars qw(%u $dbm $filename %valid $lastoperinterval);
+use vars qw(%u $dbm $filename %valid $lastoperinterval $lasttime);
%u = ();
$dbm = undef;
$filename = undef;
$lastoperinterval = 30*24*60*60;
+$lasttime = 0;
# hash of valid elements and a simple prompt
%valid = (
use strict;
+#
+# periodic processing
+#
+sub process
+{
+ if ($main::systime > $lasttime + 15) {
+ $dbm->sync;
+ $lasttime = $main::systime;
+ }
+}
+
#
# close the system
#
delete $self->{annok} if $self->{annok};
delete $self->{dxok} if $self->{dxok};
$u{$call} = $self->encode();
- $dbm->sync;
}
#
for ($dbm->get_dup($call)) {
$dbm->del_dup($call, $_);
}
- $dbm->sync;
}
#
$self->put();
}
+#
+# sync the database
+#
+
+sub sync
+{
+ $dbm->sync;
+}
+
#
# return a list of valid elements
#
$SIG{'TERM'} = 'IGNORE';
$SIG{'INT'} = 'IGNORE';
+ DXUser::sync;
+
eval {
Local::finish(); # end local processing
};
DXConnect::process();
DXMsg::process();
DXDb::process();
+ DXUser::process();
eval {
Local::process(); # do any localised processing
};