--- seahorse-2.28.0/pgp/seahorse-ldap-source.c.orig Fri Oct 16 14:25:16 2009
+++ seahorse-2.28.0/pgp/seahorse-ldap-source.c Fri Oct 16 14:28:14 2009
@@ -647,11 +647,8 @@
{
/* Now that we've resolved our address, connect via IP */
- gchar *url;
- url = g_strdup_printf ("ldap://%s:%u", soup_address_get_physical (lop->addr), port);
- ldap_initialize (&(lop->ldap), url);
- g_free (url);
+ lop->ldap = ldap_init (soup_address_get_physical (lop->addr), port);
g_return_if_fail (lop->ldap != NULL);
}
@@ -658,7 +655,7 @@
#else /* WITH_SOUP */
/* No async DNS resolve, let libldap handle resolving synchronously */
- ldap_initialize (&(lop->ldap), server);
+ lop->ldap = ldap_init (server, port);
g_return_if_fail (lop->ldap != NULL);
#endif /* WITH_SOUP */
@@ -1465,7 +1462,7 @@
g_return_val_if_fail (uri && *uri, FALSE);
r = ldap_url_parse (uri, &url);
- if (r == LDAP_URL_SUCCESS) {
+ if (r == LDAP_SUCCESS) {
/* Some checks to make sure it's a simple URI */
if (!(url->lud_host && url->lud_host[0]) ||
@@ -1476,7 +1473,7 @@
ldap_free_urldesc (url);
}
- return r == LDAP_URL_SUCCESS;
+ return r == LDAP_SUCCESS;
}
#endif /* WITH_LDAP */
--- seahorse-2.28.1/pgp/seahorse-ldap-source.c.orig 2009-10-19 14:52:17.965690000 +0800
+++ seahorse-2.28.1/pgp/seahorse-ldap-source.c 2009-10-19 14:59:23.734805000 +0800
@@ -1460,8 +1460,11 @@
int r;
g_return_val_if_fail (uri && *uri, FALSE);
-
- r = ldap_url_parse (uri, &url);
+
+ if (strchr (uri, '\/') != strrchr (uri, '\/'))
+ r = ldap_url_parse_nodn (uri, &url);
+ else
+ r = ldap_url_parse (uri, &url);
if (r == LDAP_SUCCESS) {
/* Some checks to make sure it's a simple URI */