]> git.sur5r.net Git - openldap/commitdiff
1. add ldap_get_lderrno(), required if struct ldap is private
authorStuart Lynne <sl@openldap.org>
Tue, 27 Oct 1998 07:10:20 +0000 (07:10 +0000)
committerStuart Lynne <sl@openldap.org>
Tue, 27 Oct 1998 07:10:20 +0000 (07:10 +0000)
include/ldap.h
libraries/libldap/error.c

index 2486fe07fbef2415f8e94b82f7c30c19df881336..b919b6bbc6e19cb77ada3b73e13556f9ad3895d6 100644 (file)
@@ -523,6 +523,7 @@ LDAP_F int ldap_delete_s LDAP_P(( LDAP *ld, char *dn ));
 LDAP_F int ldap_result2error LDAP_P(( LDAP *ld, LDAPMessage *r, int freeit ));
 LDAP_F char *ldap_err2string LDAP_P(( int err ));
 LDAP_F void ldap_perror LDAP_P(( LDAP *ld, char *s ));
+LDAP_F int ldap_get_lderrno LDAP_P((LDAP *ld, char **matched, char **msg));
 
 /*
  * in modify.c:
index d7b96c7ebe143c00e8ddc7bbe1eb0ea8fdb6cd33..04d9f255a7c9a523462acc30154db603cf639a20 100644 (file)
@@ -164,3 +164,14 @@ ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit )
 
        return( ld->ld_errno );
 }
+
+
+int 
+ldap_get_lderrno(LDAP *ld, char **matched, char **msg)
+{
+        if ( matched )
+                *matched = ld->ld_matched;
+        if ( msg )
+                *msg = NULL;
+        return( ld->ld_errno );
+}