summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bccee9f)
Rather than logging what we're searching for beforehand, and then
indicating failure after (but not success), just output the results
and search details after retrieval.
switch (op) {
case OP_GET:
if (ishex) {
switch (op) {
case OP_GET:
if (ishex) {
- logthing(LOGTHING_NOTICE,
- "Getting keyid 0x%" PRIX64,
- keyid);
result = config.dbbackend->fetch_key(keyid,
&publickey, false);
} else {
result = config.dbbackend->fetch_key(keyid,
&publickey, false);
} else {
- logthing(LOGTHING_NOTICE,
- "Getting key(s) for search text %s",
- search);
result = config.dbbackend->fetch_key_text(
search,
&publickey);
}
if (result) {
result = config.dbbackend->fetch_key_text(
search,
&publickey);
}
if (result) {
+ logthing(LOGTHING_NOTICE,
+ "Found %d key(s) for search %s",
+ result,
+ search);
puts("<pre>");
cleankeys(publickey);
flatten_publickey(publickey,
puts("<pre>");
cleankeys(publickey);
flatten_publickey(publickey,
puts("</pre>");
} else {
logthing(LOGTHING_NOTICE,
puts("</pre>");
} else {
logthing(LOGTHING_NOTICE,
- "Failed to fetch key.");
+ "Failed to find key for search %s",
+ search);
puts("Key not found");
}
break;
puts("Key not found");
}
break;