]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schemaparse.c
Use IPV6_V6ONLY on IPv6 sockets if available. This way we only get IPv6
[openldap] / servers / slapd / schemaparse.c
index 1ae61e0b65922068918466f2d5a47227703e8b65..1f9138753b38459864de403b687d815e669c37f7 100644 (file)
@@ -21,22 +21,24 @@ int global_schemacheck = 1; /* schemacheck ON is default */
 static void            oc_usage(void); 
 static void            at_usage(void);
 
-static char *const err2text[SLAP_SCHERR_LAST+1] = {
+static char *const err2text[] = {
        "Success",
        "Out of memory",
        "ObjectClass not found",
        "ObjectClass inappropriate SUPerior",
+       "ObjectClass operational",
+       "Duplicate objectClass",
        "AttributeType not found",
        "AttributeType inappropriate USAGE",
-       "Duplicate objectClass",
+       "AttributeType inappropriate SUPerior",
+       "AttributeType SYNTAX or SUPerior required",
        "Duplicate attributeType",
-       "Duplicate ldapSyntax",
-       "Duplicate matchingRule",
-       "OID or name required",
-       "SYNTAX or SUPerior required",
        "MatchingRule not found",
+       "Duplicate matchingRule",
        "Syntax not found",
        "Syntax required",
+       "Duplicate ldapSyntax",
+       "OID or name required",
        "Qualifier not supported",
        "Invalid NAME",
        "OID could not be expanded"
@@ -45,7 +47,7 @@ static char *const err2text[SLAP_SCHERR_LAST+1] = {
 char *
 scherr2str(int code)
 {
-       if ( code < 0 || code >= (sizeof(err2text)/sizeof(char *)) ) {
+       if ( code < 0 || SLAP_SCHERR_LAST <= code ) {
                return "Unknown error";
        } else {
                return err2text[code];
@@ -118,7 +120,7 @@ parse_oc(
                return 1;
        }
 
-       code = oc_add(oc,&err);
+       code = oc_add(oc,1,&err);
        if ( code ) {
                fprintf( stderr, "%s: line %d: %s: \"%s\"\n",
                         fname, lineno, scherr2str(code), err);