]> git.sur5r.net Git - openldap/commitdiff
Update error codes based upon draft-ietf-ldapext-ldap-c-api-01
authorKurt Zeilenga <kurt@openldap.org>
Tue, 22 Dec 1998 04:45:14 +0000 (04:45 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 22 Dec 1998 04:45:14 +0000 (04:45 +0000)
Remove ldap_get_lderrno().

include/ldap.h
libraries/libldap/error.c

index f541337c9341189386772048ae070e7f79c9956e..499d096aa0a9da940a5d39fc2b66727bf0e7466c 100644 (file)
@@ -532,7 +532,6 @@ 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 4fe8f855c62d49a7963ba2912a127b1c668a9534..ed911cb5f8015dc8901e1c204974f46e15440ae7 100644 (file)
@@ -18,24 +18,34 @@ static struct ldaperror ldap_errlist[] = {
        {LDAP_SUCCESS,                                  "Success" },
        {LDAP_OPERATIONS_ERROR,                 "Operations error" },
        {LDAP_PROTOCOL_ERROR,                   "Protocol error" },
-       {LDAP_TIMELIMIT_EXCEEDED,               "Timelimit exceeded" },
-       {LDAP_SIZELIMIT_EXCEEDED,               "Sizelimit exceeded" },
+       {LDAP_TIMELIMIT_EXCEEDED,               "Time limit exceeded" },
+       {LDAP_SIZELIMIT_EXCEEDED,               "Size limit exceeded" },
        {LDAP_COMPARE_FALSE,                    "Compare false" },
        {LDAP_COMPARE_TRUE,                     "Compare true" },
        {LDAP_STRONG_AUTH_NOT_SUPPORTED, "Strong authentication not supported" },
        {LDAP_STRONG_AUTH_REQUIRED,     "Strong authentication required" },
        {LDAP_PARTIAL_RESULTS,                  "Partial results and referral received" },
+
+       {LDAP_REFERRAL,                                 "Referral"},
+       {LDAP_ADMINLIMIT_EXCEEDED,              "Administrative limit exceeded"},
+       {LDAP_UNAVAILABLE_CRITICIAL_EXTENSION,
+                                                                       "Criticial extension is unavailable"},
+       {LDAP_CONFIDENTIALITY_REQUIRED, "Confidentiality required"},
+       {LDAP_SASL_BIND_IN_PROGRESS,    "SASL bind in progress"},
+
        {LDAP_NO_SUCH_ATTRIBUTE,                "No such attribute" },
        {LDAP_UNDEFINED_TYPE,                   "Undefined attribute type" },
        {LDAP_INAPPROPRIATE_MATCHING,   "Inappropriate matching" },
        {LDAP_CONSTRAINT_VIOLATION,     "Constraint violation" },
        {LDAP_TYPE_OR_VALUE_EXISTS,     "Type or value exists" },
        {LDAP_INVALID_SYNTAX,                   "Invalid syntax" },
+
        {LDAP_NO_SUCH_OBJECT,                   "No such object" },
        {LDAP_ALIAS_PROBLEM,                    "Alias problem" },
        {LDAP_INVALID_DN_SYNTAX,                "Invalid DN syntax" },
        {LDAP_IS_LEAF,                                  "Object is a leaf" },
        {LDAP_ALIAS_DEREF_PROBLEM,              "Alias dereferencing problem" },
+
        {LDAP_INAPPROPRIATE_AUTH,               "Inappropriate authentication" },
        {LDAP_INVALID_CREDENTIALS,              "Invalid credentials" },
        {LDAP_INSUFFICIENT_ACCESS,              "Insufficient access" },
@@ -43,6 +53,7 @@ static struct ldaperror ldap_errlist[] = {
        {LDAP_UNAVAILABLE,                              "DSA is unavailable" },
        {LDAP_UNWILLING_TO_PERFORM,     "DSA is unwilling to perform" },
        {LDAP_LOOP_DETECT,                              "Loop detected" },
+
        {LDAP_NAMING_VIOLATION,                 "Naming violation" },
        {LDAP_OBJECT_CLASS_VIOLATION,   "Object class violation" },
        {LDAP_NOT_ALLOWED_ON_NONLEAF,   "Operation not allowed on nonleaf" },
@@ -50,6 +61,8 @@ static struct ldaperror ldap_errlist[] = {
        {LDAP_ALREADY_EXISTS,                   "Already exists" },
        {LDAP_NO_OBJECT_CLASS_MODS,     "Cannot modify object class" },
        {LDAP_RESULTS_TOO_LARGE,                "Results too large" },
+       {LDAP_AFFECTS_MULTIPLE_DSAS,    "Operation affects multiple DSAs" },
+
        {LDAP_OTHER,                                    "Unknown error" },
        {LDAP_SERVER_DOWN,                              "Can't contact LDAP server" },
        {LDAP_LOCAL_ERROR,                              "Local error" },
@@ -61,6 +74,15 @@ static struct ldaperror ldap_errlist[] = {
        {LDAP_USER_CANCELLED,                   "User cancelled operation" },
        {LDAP_PARAM_ERROR,                              "Bad parameter to an ldap routine" },
        {LDAP_NO_MEMORY,                                "Out of memory" },
+
+       {LDAP_CONNECT_ERROR,                    "Connect error" },
+       {LDAP_NOT_SUPPORTED,                    "Not Supported" },
+       {LDAP_CONTROL_NOT_FOUND,                "Control not found" },
+       {LDAP_NO_RESULTS_RETURNED,              "No results returned" },
+       {LDAP_MORE_RESULTS_TO_RETURN,   "More results to return" },
+       {LDAP_CLIENT_LOOP,                              "Client Loop" },
+       {LDAP_REFERRAL_LIMIT_EXCEEDED,  "Referral Limit Exceeded" },
+
        {-1, 0 }
 };
 
@@ -79,10 +101,10 @@ ldap_err2string( int err )
        return( "Unknown error" );
 }
 
+/* depreciated */
 void
 ldap_perror( LDAP *ld, char *s )
 {
-#ifdef LDAP_LIBUI
        int     i;
 
        Debug( LDAP_DEBUG_TRACE, "ldap_perror\n", 0, 0, 0 );
@@ -109,7 +131,6 @@ ldap_perror( LDAP *ld, char *s )
 
        fprintf( stderr, "%s: Not an LDAP errno %d\n", s, ld->ld_errno );
        fflush( stderr );
-#endif /* !LDAP_LIBUI */
 }
 
 int
@@ -155,14 +176,3 @@ 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 );
-}