From 1ac20b1f02df83ff8c3a19bf5a2608057d09c852 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 17 Feb 2004 13:34:51 +0000 Subject: [PATCH] improve previous commit --- servers/slapd/back-ldap/add.c | 6 +++--- servers/slapd/back-ldap/modify.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/servers/slapd/back-ldap/add.c b/servers/slapd/back-ldap/add.c index 3aff8df61e..adf8063818 100644 --- a/servers/slapd/back-ldap/add.c +++ b/servers/slapd/back-ldap/add.c @@ -45,7 +45,7 @@ ldap_back_add( struct berval mdn = { 0, NULL }; ber_int_t msgid; dncookie dc; - int update; + int isupdate; #ifdef LDAP_BACK_PROXY_AUTHZ LDAPControl **ctrls = NULL; int rc = LDAP_SUCCESS; @@ -90,9 +90,9 @@ ldap_back_add( dc.ctx = "addDnAttr"; #endif - update = op->o_bd->be_update_ndn.bv_len; + isupdate = be_isupdate( op->o_bd, &op->o_ndn ); for (i=0, a=op->oq_add.rs_e->e_attrs; a; a=a->a_next) { - if ( !update && a->a_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && a->a_desc->ad_type->sat_no_user_mod ) { continue; } diff --git a/servers/slapd/back-ldap/modify.c b/servers/slapd/back-ldap/modify.c index 2c54ceb7a1..a11321b571 100644 --- a/servers/slapd/back-ldap/modify.c +++ b/servers/slapd/back-ldap/modify.c @@ -46,7 +46,7 @@ ldap_back_modify( struct berval mdn = { 0, NULL }; ber_int_t msgid; dncookie dc; - int update; + int isupdate; #ifdef LDAP_BACK_PROXY_AUTHZ LDAPControl **ctrls = NULL; #endif /* LDAP_BACK_PROXY_AUTHZ */ @@ -91,11 +91,11 @@ ldap_back_modify( dc.ctx = "modifyAttrDN"; #endif - update = op->o_bd->be_update_ndn.bv_len; + isupdate = be_isupdate( op->o_bd, &op->o_ndn ); for (i=0, ml=op->oq_modify.rs_modlist; ml; ml=ml->sml_next) { int is_oc = 0; - if ( !update && ml->sml_desc->ad_type->sat_no_user_mod ) { + if ( !isupdate && ml->sml_desc->ad_type->sat_no_user_mod ) { continue; } -- 2.39.5