]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/entry-id.c
cleanup error messages
[openldap] / servers / slapd / back-sql / entry-id.c
index e1cf863cd1218f3862d7dbac399ee77cbe8b186e..e1644e2f4011a20216dd7ddbbea1ec040d6a096f 100644 (file)
@@ -236,7 +236,10 @@ backsql_count_children(
                char *end;
 
                *nchildren = strtol( row.cols[ 0 ], &end, 0 );
-               if ( end[ 0 ] != '\0' ) {
+               if ( end[ 0 ] != '\0' && end[0] != '.' ) {
+                       /* FIXME: braindead RDBMSes return
+                        * a fractional number from COUNT!
+                        */
                        res = LDAP_OTHER;
                }
 
@@ -396,7 +399,7 @@ backsql_id2entry( backsql_srch_info *bsi, Entry *e, backsql_entryID *eid )
                        }
 
                        rc = backsql_supad2at( bsi->bsi_oc, attr->an_desc, &vat );
-                       if ( rc != 0 ) {
+                       if ( rc != 0 || vat == NULL ) {
                                Debug( LDAP_DEBUG_TRACE, "backsql_id2entry(): "
                                                "attribute '%s' is not defined "
                                                "for objectlass '%s'\n",