1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

kbx: Fix error code return in keyboxd.

* kbx/frontend.c (kbxd_add_resource): Print a diagnostic on error.
* kbx/backend-kbx.c (be_kbx_add_resource): Acttually returh the error
code.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-09-27 14:28:36 +02:00
parent 0af1c6447d
commit 8e57413048
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 6 additions and 2 deletions

View File

@ -200,7 +200,7 @@ be_kbx_add_resource (ctrl_t ctrl, backend_handle_t *r_hd,
leave: leave:
xfree (hd); xfree (hd);
return 0; return err;
} }

View File

@ -194,7 +194,11 @@ kbxd_add_resource (ctrl_t ctrl, const char *filename_arg, int readonly)
leave: leave:
if (err) if (err)
be_generic_release_backend (ctrl, handle); {
log_error ("error adding resource '%s': %s\n",
filename, gpg_strerror (err));
be_generic_release_backend (ctrl, handle);
}
xfree (filename); xfree (filename);
return err; return err;
} }