summaryrefslogtreecommitdiff
path: root/Echolot/Stats.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-04-24 12:25:10 +0000
committerPeter Palfrader <peter@palfrader.org>2004-04-24 12:25:10 +0000
commit75da8751b1e5a5a39f8743b44971224b0ab34c31 (patch)
tree3e194bcac050e2876c1821fd40f00b91dff63a91 /Echolot/Stats.pm
parent82c0bb931633d67a7e60bddb756264edcd4620b6 (diff)
Move duplicated IO::Handle preperations for GnuPG::Interface to Echolot::Tools::make_gpg_fds.
Diffstat (limited to 'Echolot/Stats.pm')
-rw-r--r--Echolot/Stats.pm26
1 files changed, 2 insertions, 24 deletions
diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm
index cdb2372..31eb2b6 100644
--- a/Echolot/Stats.pm
+++ b/Echolot/Stats.pm
@@ -856,18 +856,7 @@ sub build_pgpring_type($$$$) {
# only if we have a conf
if ( defined Echolot::Globals::get()->{'storage'}->get_nick($addr) ) {
- my ( $stdin_fh, $stdout_fh, $stderr_fh, $status_fh )
- = ( IO::Handle->new(),
- IO::Handle->new(),
- IO::Handle->new(),
- IO::Handle->new(),
- );
- my $handles = GnuPG::Handles->new (
- stdin => $stdin_fh,
- stdout => $stdout_fh,
- stderr => $stderr_fh,
- status => $status_fh
- );
+ my ( $stdin_fh, $stdout_fh, $stderr_fh, $status_fh, $handles ) = Echolot::Tools::make_gpg_fds();
my $pid = $GnuPG->wrap_call(
commands => [ '--import' ],
command_args => [qw{--no-options --no-secmem-warning --no-default-keyring --fast-list-mode --keyring}, $keyring, '--', '-' ],
@@ -901,18 +890,7 @@ sub build_pgpring_type($$$$) {
sub build_pgpring_export($$$$) {
my ($GnuPG, $keyring, $file, $keyids) = @_;
- my ( $stdin_fh, $stdout_fh, $stderr_fh, $status_fh )
- = ( IO::Handle->new(),
- IO::Handle->new(),
- IO::Handle->new(),
- IO::Handle->new(),
- );
- my $handles = GnuPG::Handles->new (
- stdin => $stdin_fh,
- stdout => $stdout_fh,
- stderr => $stderr_fh,
- status => $status_fh
- );
+ my ( $stdin_fh, $stdout_fh, $stderr_fh, $status_fh, $handles ) = Echolot::Tools::make_gpg_fds();
my $pid = $GnuPG->wrap_call(
commands => [ '--export' ],
command_args => [qw{--no-options --no-secmem-warning --no-default-keyring --keyring}, $keyring, @$keyids ],