dirmngr/src (ChangeLog ldap.c server.c)
cvs user wk
cvs at cvs.gnupg.org
Wed Jun 15 10:31:09 CEST 2005
Date: Wednesday, June 15, 2005 @ 10:53:36
Author: wk
Path: /cvs/dirmngr/dirmngr/src
Modified: ChangeLog ldap.c server.c
(cmd_lookup): Take care of NO_DATA which might get
returned also by start_cert_fetch().
-----------+
ChangeLog | 5 +++++
ldap.c | 2 +-
server.c | 18 ++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
Index: dirmngr/src/ChangeLog
diff -u dirmngr/src/ChangeLog:1.48 dirmngr/src/ChangeLog:1.49
--- dirmngr/src/ChangeLog:1.48 Wed Apr 20 19:03:56 2005
+++ dirmngr/src/ChangeLog Wed Jun 15 10:53:35 2005
@@ -1,3 +1,8 @@
+2005-06-15 Werner Koch <wk at g10code.com>
+
+ * server.c (cmd_lookup): Take care of NO_DATA which might get
+ returned also by start_cert_fetch().
+
2005-04-20 Werner Koch <wk at g10code.com>
* ldap.c (ldap_wrapper_wait_connections): Set a shutdown flag.
Index: dirmngr/src/ldap.c
diff -u dirmngr/src/ldap.c:1.49 dirmngr/src/ldap.c:1.50
--- dirmngr/src/ldap.c:1.49 Wed Apr 20 19:03:56 2005
+++ dirmngr/src/ldap.c Wed Jun 15 10:53:35 2005
@@ -712,7 +712,7 @@
log_info (_("ldap wrapper %d started\n"), (int)ctx->pid);
/* Need to wait for the first byte so we are able to detect an empty
- output and not let the consumer se an EOF without further error
+ output and not let the consumer see an EOF without further error
indications. The CRL loading logic assumes that after return
from this function, a failed search (e.g. host not found ) is
indicated right away. */
Index: dirmngr/src/server.c
diff -u dirmngr/src/server.c:1.50 dirmngr/src/server.c:1.51
--- dirmngr/src/server.c:1.50 Wed Apr 20 19:03:56 2005
+++ dirmngr/src/server.c Wed Jun 15 10:53:35 2005
@@ -649,6 +649,7 @@
size_t valuelen;
ldap_server_t ldapserver;
cert_fetch_context_t fetch_context;
+ int any_no_data = 0;
/* Break the line down into an STRLIST */
for (p=line; *p; line = p)
@@ -686,6 +687,14 @@
/* Fetch certificates matching pattern */
err = start_cert_fetch (ctrl, &fetch_context, list, ldapserver);
+ if ( gpg_err_code (err) == GPG_ERR_NO_DATA )
+ {
+ if (DBG_LOOKUP)
+ log_debug ("cmd_lookup: no data\n");
+ err = 0;
+ any_no_data = 1;
+ continue;
+ }
if (err)
{
log_error (_("start_cert_fetch failed: %s\n"), gpg_strerror (err));
@@ -697,6 +706,12 @@
{
xfree (value); value = NULL;
err = fetch_next_cert (fetch_context, &value, &valuelen);
+ if (gpg_err_code (err) == GPG_ERR_NO_DATA )
+ {
+ err = 0;
+ any_no_data = 1;
+ break; /* Ready. */
+ }
if (gpg_err_code (err) == GPG_ERR_TRUNCATED)
{
truncated = 1;
@@ -758,6 +773,9 @@
assuan_write_status (ctx, "TRUNCATED", str);
}
+ if (!err && !count && any_no_data)
+ err = gpg_error (GPG_ERR_NO_DATA);
+
leave:
if (err)
log_error (_("command %s failed: %s\n"), "LOOKUP", gpg_strerror (err));
More information about the Gnupg-commits
mailing list