tolerate that config_get_vals() returns success with no values (ITS#4341)

This commit is contained in:
Pierangelo Masarati 2006-01-14 10:21:47 +00:00
parent f3dba23fbb
commit e720c15c4d

View File

@ -4211,7 +4211,9 @@ config_build_attrs( Entry *e, AttributeType **at, AttributeDescription *ad,
for (i=0;ct[i].name;i++) { for (i=0;ct[i].name;i++) {
if (ct[i].ad == (*at)->sat_ad) { if (ct[i].ad == (*at)->sat_ad) {
rc = config_get_vals(&ct[i], c); rc = config_get_vals(&ct[i], c);
if (rc == LDAP_SUCCESS) { /* NOTE: tolerate that config_get_vals()
* returns success with no values */
if (rc == LDAP_SUCCESS && c->rvalue_vals != NULL ) {
if ( c->rvalue_nvals ) if ( c->rvalue_nvals )
attr_merge(e, ct[i].ad, c->rvalue_vals, attr_merge(e, ct[i].ad, c->rvalue_vals,
c->rvalue_nvals); c->rvalue_nvals);