tags 579343 + patch tags 579493 + patch kthxbye Attached is a patch that fixes both of these bugs. It removes the defined call around the array and also does not call close on the socket unless the socket is defined.
-- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
diff --git a/Server.pm b/Server.pm index a48a0cc..dbc9312 100644 --- a/Server.pm +++ b/Server.pm @@ -52,7 +52,8 @@ sub accept { } sub DESTROY { - shift->{SOCK}->close; + my $self = shift; + $self->{SOCK}->close if defined $self->{SOCK}; } 1; diff --git a/Server/Relay.pm b/Server/Relay.pm index 2f82d82..fd40cbb 100644 --- a/Server/Relay.pm +++ b/Server/Relay.pm @@ -28,7 +28,7 @@ sub _relay { my $res = new Net::DNS::Resolver; my @mx = mx($res, defined($1) ? $1 : hostdomain); - next unless defined(@mx); + next unless @mx; # Loop through the MXs. foreach $rr (@mx) {
signature.asc
Description: Digital signature