Code

openldap: prefer using ldap_err2string() over sstrerror()
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 20 Aug 2014 10:27:21 +0000 (12:27 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Fri, 29 Aug 2014 13:09:55 +0000 (15:09 +0200)
src/openldap.c

index 08c65033e07f9906c865bc65110e1a24f7ecbb26..46d92679fdc0df7f70b95f36f6f6a83693bc0c52 100644 (file)
@@ -66,9 +66,8 @@ static int ldap_init_host (ldap_t *st) /* {{{ */
        rc = ldap_initialize (&ld, st->url);
        if (rc != LDAP_SUCCESS)
        {
-               char errbuf[1024];
-               sstrerror (errno, errbuf, sizeof (errbuf));
-               ERROR ("ldap_initialize failed: %s", errbuf);
+               ERROR ("openldap plugin: ldap_initialize failed: %s",
+                       ldap_err2string (rc));
                st->state = 0;
                return (-1);
        }