diff options
Diffstat (limited to 'src/import.c')
-rw-r--r-- | src/import.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/import.c b/src/import.c index 3bc7441..6233a15 100644 --- a/src/import.c +++ b/src/import.c @@ -3,17 +3,17 @@ Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH This file is part of GPGME. - + GPGME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GPGME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -77,7 +77,7 @@ gpgme_op_import_result (gpgme_ctx_t ctx) return NULL; } - + if (_gpgme_debug_trace ()) { gpgme_import_status_t impstat; @@ -131,7 +131,7 @@ parse_import (char *args, gpgme_import_status_t *import_status, int problem) { /* The crypto backend does not behave. */ free (import); - return gpg_error (GPG_ERR_INV_ENGINE); + return trace_gpg_error (GPG_ERR_INV_ENGINE); } args = tail; @@ -174,9 +174,8 @@ parse_import (char *args, gpgme_import_status_t *import_status, int problem) import->fpr = strdup (args); if (!import->fpr) { - int saved_errno = errno; free (import); - return gpg_error_from_errno (saved_errno); + return gpg_error_from_syserror (); } *import_status = import; @@ -196,7 +195,7 @@ parse_import_res (char *args, gpgme_import_result_t result) (x) = strtol (args, &tail, 0); \ if (errno || args == tail || *tail != ' ') \ /* The crypto backend does not behave. */ \ - return gpg_error (GPG_ERR_INV_ENGINE); \ + return trace_gpg_error (GPG_ERR_INV_ENGINE); \ args = tail; PARSE_NEXT (result->considered); @@ -318,7 +317,7 @@ gpgme_op_import (gpgme_ctx_t ctx, gpgme_data_t keydata) static gpgme_error_t -_gpgme_op_import_keys_start (gpgme_ctx_t ctx, int synchronous, +_gpgme_op_import_keys_start (gpgme_ctx_t ctx, int synchronous, gpgme_key_t *keys) { gpgme_error_t err; @@ -382,7 +381,7 @@ gpgme_op_import_keys_start (gpgme_ctx_t ctx, gpgme_key_t *keys) while (keys[i]) { TRACE_LOG3 ("keys[%i] = %p (%s)", i, keys[i], - (keys[i]->subkeys && keys[i]->subkeys->fpr) ? + (keys[i]->subkeys && keys[i]->subkeys->fpr) ? keys[i]->subkeys->fpr : "invalid"); i++; } @@ -421,7 +420,7 @@ gpgme_op_import_keys (gpgme_ctx_t ctx, gpgme_key_t *keys) while (keys[i]) { TRACE_LOG3 ("keys[%i] = %p (%s)", i, keys[i], - (keys[i]->subkeys && keys[i]->subkeys->fpr) ? + (keys[i]->subkeys && keys[i]->subkeys->fpr) ? keys[i]->subkeys->fpr : "invalid"); i++; } |