- dbg(carp("Export Error2: $key\t$val\n$@")) if $@;
- LogDbg('DXCommand', "$ref->{call} deleted, too old");
- $del++;
+ dbg(carp("Export Error2: delete '$key' => '$val' $@")) if $@;
+ next;
+ }
+ if (exists $ref->{lockout} && $ref->{lockout} == 1 && exists $ref->{priv} && $ref->{priv} == 1) {
+ LogDbg('DXCommand', "$ref->{call} depriv'd and unlocked");
+ $ref->{lockout} = $ref->{priv} = 0;
+ $ref->put;
+ ++$unlocked;
+ }
+ if ($ref->is_node && $main::systime > $t + $veryold) {
+ LogDbg('DXCommand', sprintf("NODE $ref->{call} deleted (%s) old", difft($t, ' ')));
+ ++$del;
+ ++$nodes;
+ eval {$dbm->del($key)};
+ dbg(carp("Export Error2: delete '$key' => '$val' $@")) if $@;
+ next;
+ }
+
+ my $normcall = normalise_call($key);
+ if ($normcall ne $key) {
+ # if the normalised call does not exist, create it from the duff call.
+ my $nref = DXUser::get_current($normcall);
+ unless ($nref) {
+ $ref->{call} = $normcall;
+ $ref->put;
+ LogDbg('DXCommand', "DXProt: spurious call $key normalises to $normcall renaming $key -> $normcall");
+ ++$renamed;
+ }
+ LogDbg('DXCommand', "DXProt: spurious call $key (should be $normcall), removing");
+ eval {$dbm->del($key)};
+ dbg(carp("Export Error1: delete $key => '$val' $@")) if $@;
+ ++$spurious;
+ ++$del;