diff options
author | Peter Palfrader <peter@palfrader.org> | 2002-08-21 20:10:51 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2002-08-21 20:10:51 +0000 |
commit | f2b073b2c8814633cd8810214b650821f1dd6216 (patch) | |
tree | 94d0ca085bccb5930b57b74bc2d63bb89dead9e9 /Echolot | |
parent | c5e2563b7a463604c759c3e106b19e8ad3be4697 (diff) |
Hopefully work around one uninitialized value and try to catch it
Diffstat (limited to 'Echolot')
-rw-r--r-- | Echolot/Storage/File.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Echolot/Storage/File.pm b/Echolot/Storage/File.pm index 4e90d1a..e6bfd02 100644 --- a/Echolot/Storage/File.pm +++ b/Echolot/Storage/File.pm @@ -1,7 +1,7 @@ package Echolot::Storage::File; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: File.pm,v 1.38 2002/07/16 02:59:17 weasel Exp $ +# $Id: File.pm,v 1.39 2002/08/21 20:10:51 weasel Exp $ # =pod @@ -731,6 +731,9 @@ sub set_caps($$$$$$;$) { sub set_key($$$$$$$$$) { my ($self, $type, $nick, $address, $key, $keyid, $version, $caps, $summary, $timestamp) = @_; + + (defined $address) or + cluck ("$address not defined in set_key"); if (! defined $self->{'METADATA'}->{'remailers'}->{$address}) { $self->{'METADATA'}->{'remailers'}->{$address} = @@ -739,7 +742,8 @@ sub set_key($$$$$$$$$) { }; } else { $self->{'METADATA'}->{'remailers'}->{$address}->{'status'} = 'active' - if ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'} eq 'expired'); + if (!defined ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'}) || + ($self->{'METADATA'}->{'remailers'}->{$address}->{'status'} eq 'expired')); }; if (! defined $self->{'METADATA'}->{'remailers'}->{$address}->{'keys'}) { |