alter changing %conns callsign logic slightly
[spider.git] / perl / Msg.pm
index 3a422c3a817c4c93fe32fdd1c1f2f281c5a61e0f..0e6ee9661c07abd36053f5a1ef1032db739f1d43 100644 (file)
@@ -118,7 +118,8 @@ sub conns
        if (ref $pkg) {
                $call = $pkg->{call} unless $call;
                return undef unless $call;
-               confess "changing $pkg->{call} to $call" if exists $pkg->{call} && $call ne $pkg->{call};
+               dbg('connll', "changing $pkg->{call} to $call") if exists $pkg->{call} && $call ne $pkg->{call};
+               delete $conns{$pkg->{call}} if $pkg->{call} ne $call; 
                $pkg->{call} = $call;
                $ref = $conns{$call} = $pkg;
                dbg('connll', "Connection $pkg->{cnum} $call stored");