#include <ac/socket.h>
#include <ac/string.h>
+#include <ac/time.h>
-#include "lber.h"
-#include "ldap.h"
+#include "ldap-int.h"
struct ldaperror {
int e_code;
return( "Unknown error" );
}
-#ifndef NO_USERINTERFACE
void
ldap_perror( LDAP *ld, char *s )
{
+#ifdef LDAP_LIBUI
int i;
Debug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 );
fprintf( stderr, "%s: Not an LDAP errno %d\n", s, ld->ld_errno );
fflush( stderr );
+#endif /* !LDAP_LIBUI */
}
-#else
-
-void
-ldap_perror( LDAP *ld, char *s )
-{
-}
-
-#endif /* NO_USERINTERFACE */
-
-
int
ldap_result2error( LDAP *ld, LDAPMessage *r, int freeit )
{
LDAPMessage *lm;
BerElement ber;
long along;
- int rc;
+ unsigned long rc;
Debug( LDAP_DEBUG_TRACE, "ldap_result2error\n", 0, 0, 0 );
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 );
+}