From e61c9c9f2e96a129f31a1bf49d4f2514137a3b01 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 15 Feb 2003 11:43:41 +0000 Subject: Chain pinging fixes --- Echolot/Stats.pm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Echolot/Stats.pm') diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm index 515107d..39eef51 100644 --- a/Echolot/Stats.pm +++ b/Echolot/Stats.pm @@ -1,7 +1,7 @@ package Echolot::Stats; # (c) 2002 Peter Palfrader -# $Id: Stats.pm,v 1.38 2003/01/14 05:25:35 weasel Exp $ +# $Id: Stats.pm,v 1.39 2003/02/15 11:43:41 weasel Exp $ # =pod @@ -705,12 +705,12 @@ sub build_pgpring_type($$$$) { ($stdout eq '') or Echolot::Log::info("GnuPG returned something in stdout '$stdout' while adding key for '$addr': So what?"); - unless ($status =~ /^^\[GNUPG:\] IMPORTED /m) { - if ($status =~ /^^\[GNUPG:\] IMPORT_RES /m) { - Echolot::Log::info("GnuPG status '$status' indicates more than one key for '$addr' imported. Ignoring."); - } else { - Echolot::Log::info("GnuPG status '$status' didn't indicate key for '$addr' was imported correctly. Ignoring."); - }; + # See DETAIL.gz in GnuPG's doc directory for syntax of GnuPG status + my ($count, $count_imported) = $status =~ /^\[GNUPG:\] IMPORT_RES (\d+) \d+ (\d+)/m; + if ($count_imported > 1) { + Echolot::Log::info("GnuPG status '$status' indicates more than one key for '$addr' imported. Ignoring."); + } elsif ($count_imported < 1) { + Echolot::Log::info("GnuPG status '$status' didn't indicate key for '$addr' was imported correctly. Ignoring."); }; $keyids->{$final_keyid} = $remailer->{'showit'}; }; -- cgit v1.2.3