1. add ldap_get_lderrno(), required if struct ldap is private

This commit is contained in:
Stuart Lynne 1998-10-27 07:10:20 +00:00
parent d0a843b74d
commit 80cf83ace8
2 changed files with 12 additions and 0 deletions

View 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:

View 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 );
}