From ddbe1acb6bcb16b6b5efc926fe2fafe3bacf601a Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 6 May 2000 20:13:36 +0000 Subject: if a port isn't specified in the uri default to 389. * backend/pas/pas-backend-ldap.c (pas_backend_ldap_load_uri): if a port isn't specified in the uri default to 389. svn path=/trunk/; revision=2831 --- addressbook/backend/pas/pas-backend-ldap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addressbook/backend/pas') diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c index e40f6cb922..53d32d0e83 100644 --- a/addressbook/backend/pas/pas-backend-ldap.c +++ b/addressbook/backend/pas/pas-backend-ldap.c @@ -889,6 +889,9 @@ pas_backend_ldap_load_uri (PASBackend *backend, bl->priv->uri = g_strdup (uri); bl->priv->ldap_host = g_strdup(lud->lud_host); bl->priv->ldap_port = lud->lud_port; + /* if a port wasn't specified, default to 389 */ + if (bl->priv->ldap_port == 0) + bl->priv->ldap_port = 389; bl->priv->ldap_rootdn = g_strdup(lud->lud_dn); ldap_free_urldesc(lud); -- cgit