From: Marcus Brinkmann Date: Tue, 22 Jan 2002 14:24:38 +0000 (+0000) Subject: 2002-01-22 Marcus Brinkmann X-Git-Tag: gpgme-1.2.0@1385~1139 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1e482a3cc521d9acf3f9b63f0c9abcc0dc3655cd;p=gpgme.git 2002-01-22 Marcus Brinkmann * export.c: Cleanup. --- diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index f9996f0..1d4d7b0 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2002-01-22 Marcus Brinkmann + + * export.c: Cleanup. + 2002-01-15 Marcus Brinkmann * trustlist.c: Various source clean ups. diff --git a/trunk/gpgme/export.c b/trunk/gpgme/export.c index e5f51ab..3896404 100644 --- a/trunk/gpgme/export.c +++ b/trunk/gpgme/export.c @@ -1,6 +1,6 @@ /* export.c - encrypt functions * Copyright (C) 2000 Werner Koch (dd9jn) - * Copyright (C) 2001 g10 Code GmbH + * Copyright (C) 2001, 2002 g10 Code GmbH * * This file is part of GPGME. * @@ -30,10 +30,10 @@ #include "ops.h" static void -export_status_handler ( GpgmeCtx ctx, GpgStatusCode code, char *args ) +export_status_handler (GpgmeCtx ctx, GpgStatusCode code, char *args) { - DEBUG2 ("export_status: code=%d args=`%s'\n", code, args ); - /* FIXME: Need to do more */ + DEBUG2 ("export_status: code=%d args=`%s'\n", code, args); + /* FIXME: Need to do more */ } GpgmeError @@ -85,21 +85,18 @@ gpgme_op_export_start (GpgmeCtx ctx, GpgmeRecipients recp, GpgmeData keydata) * This function can be used to extract public keys from the GnuPG key * database either in armored (by using gpgme_set_armor()) or in plain * binary form. The function expects a list of user IDs in @recp for - * whom the public keys are to be exportedkinit - * + * whom the public keys are to be exported. * * Return value: 0 for success or an error code **/ GpgmeError -gpgme_op_export ( GpgmeCtx c, GpgmeRecipients recp, GpgmeData keydata ) +gpgme_op_export (GpgmeCtx ctx, GpgmeRecipients recipients, GpgmeData keydata) { - int rc = gpgme_op_export_start ( c, recp, keydata ); - if ( !rc ) { - gpgme_wait (c, 1); - c->pending = 0; + GpgmeError err = gpgme_op_export_start (ctx, recipients, keydata); + if (!err) + { + gpgme_wait (ctx, 1); + ctx->pending = 0; } - return rc; + return err; } - - -