]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/at.c
Add debug msg if adding entry to logDB fails
[openldap] / servers / slapd / at.c
index 6f84f9ad5bd5a18b62dd38976956d9595264f568..3621763a70e3494fca42e61b855f1ab0dfabef1f 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2013 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -365,6 +365,10 @@ at_next( AttributeType **at )
        }
 #endif
 
+       if ( *at == NULL ) {
+               return 0;
+       }
+
        *at = LDAP_STAILQ_NEXT(*at,sat_next);
 
        return (*at != NULL);
@@ -655,7 +659,7 @@ at_add(
        *err = cname;
 
        if ( !at->at_usage && at->at_no_user_mod ) {
-               /* user attribute must be modifable */
+               /* user attribute must be modifiable */
                code = SLAP_SCHERR_ATTR_BAD_USAGE;
                goto error_return;
        }
@@ -721,7 +725,7 @@ at_add(
        /*
         * Inherit definitions from superiors.  We only check the
         * direct superior since that one has already inherited from
-        * its own superiorss
+        * its own superiors
         */
        if ( sat->sat_sup ) {
                Syntax *syn = syn_find(sat->sat_sup->sat_syntax->ssyn_oid);