summaryrefslogtreecommitdiff
path: root/Echolot/Stats.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-02-15 11:43:41 +0000
committerPeter Palfrader <peter@palfrader.org>2003-02-15 11:43:41 +0000
commite61c9c9f2e96a129f31a1bf49d4f2514137a3b01 (patch)
tree3759bc4364e782fa7cb177571ad195cb82121c36 /Echolot/Stats.pm
parent7adc1b95176205694c1b34878b185a41c82373e9 (diff)
Chain pinging fixes
Diffstat (limited to 'Echolot/Stats.pm')
-rw-r--r--Echolot/Stats.pm14
1 files changed, 7 insertions, 7 deletions
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 <peter@palfrader.org>
-# $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'};
};