mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Add some debugging output.
-- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
11ec4785df
commit
8f6099ac51
3 changed files with 104 additions and 6 deletions
22
g10/keydb.c
22
g10/keydb.c
|
@ -1692,7 +1692,16 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
|
|||
while ((rc == -1 || gpg_err_code (rc) == GPG_ERR_EOF)
|
||||
&& hd->current >= 0 && hd->current < hd->used)
|
||||
{
|
||||
switch (hd->active[hd->current].type)
|
||||
if (DBG_LOOKUP)
|
||||
log_debug ("%s: searching %s (resource %d of %d)\n",
|
||||
__func__,
|
||||
hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYRING
|
||||
? "keyring"
|
||||
: (hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYBOX
|
||||
? "keybox" : "unknown type"),
|
||||
hd->current, hd->used);
|
||||
|
||||
switch (hd->active[hd->current].type)
|
||||
{
|
||||
case KEYDB_RESOURCE_TYPE_NONE:
|
||||
BUG(); /* we should never see it here */
|
||||
|
@ -1707,6 +1716,17 @@ keydb_search (KEYDB_HANDLE hd, KEYDB_SEARCH_DESC *desc,
|
|||
descindex, &hd->skipped_long_blobs);
|
||||
break;
|
||||
}
|
||||
|
||||
if (DBG_LOOKUP)
|
||||
log_debug ("%s: searched %s (resource %d of %d) => %s\n",
|
||||
__func__,
|
||||
hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYRING
|
||||
? "keyring"
|
||||
: (hd->active[hd->current].type == KEYDB_RESOURCE_TYPE_KEYBOX
|
||||
? "keybox" : "unknown type"),
|
||||
hd->current, hd->used,
|
||||
rc == -1 ? "EOF" : gpg_strerror (rc));
|
||||
|
||||
if (rc == -1 || gpg_err_code (rc) == GPG_ERR_EOF)
|
||||
{
|
||||
/* EOF -> switch to next resource */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue