]> git.sur5r.net Git - openldap/commitdiff
Fix slapi_modify_internal() to deal with just the modification type of
authorLuke Howard <lukeh@openldap.org>
Fri, 19 Dec 2003 10:10:59 +0000 (10:10 +0000)
committerLuke Howard <lukeh@openldap.org>
Fri, 19 Dec 2003 10:10:59 +0000 (10:10 +0000)
a mod operation

servers/slapd/slapi/plugin.c
servers/slapd/slapi/slapi_ops.c

index e2c87669642d2f3f600db8952eadf880eedb834c..70ebf60ef3185abaebb7e84df863609bad54b1a1 100644 (file)
@@ -449,7 +449,7 @@ newExtendedOp(
        }
 
        rc = slapi_pblock_get( pPB,SLAPI_PLUGIN_EXT_OP_OIDLIST, &pTmpOIDs );
-       if ( rc != LDAP_SUCCESS ) {
+       if ( rc != 0 ) {
                rc = LDAP_OTHER;
                goto error_return;
        }
index 8cfc95d74c745c8b5aadd60397f22bda3c4d1a85..6444baa32c97c28947609485d812767bc95b7ab4 100644 (file)
@@ -714,7 +714,7 @@ slapi_add_internal(
 
        if ( rc == LDAP_SUCCESS ) {
                for ( i = 0, pMod = mods[0]; pMod != NULL; pMod = mods[++i] ) {
-                       if ( (pMod->mod_op & ~LDAP_MOD_BVALUES) != LDAP_MOD_ADD ) {
+                       if ( (pMod->mod_op & LDAP_MOD_OP ) != LDAP_MOD_ADD ) {
                                rc = LDAP_OTHER;
                                break;
                        }
@@ -969,7 +969,7 @@ slapi_modify_internal(
 
                        mod  = (Modifications *)ch_malloc( sizeof(Modifications) );
 
-                       mod->sml_op = pMod->mod_op;
+                       mod->sml_op = pMod->mod_op & LDAP_MOD_OP;
                        mod->sml_next = NULL;
                        mod->sml_desc = NULL;
                        mod->sml_type = tmp.sml_type;
@@ -986,7 +986,7 @@ slapi_modify_internal(
 
                        mod  = (Modifications *) ch_malloc( sizeof(Modifications) );
 
-                       mod->sml_op = pMod->mod_op;
+                       mod->sml_op = pMod->mod_op & LDAP_MOD_OP;
                        mod->sml_next = NULL;
                        mod->sml_desc = NULL;
                        mod->sml_type = tmp.sml_type;
@@ -996,7 +996,7 @@ slapi_modify_internal(
                *modtail = mod;
                modtail = &mod->sml_next;
 
-               switch( pMod->mod_op ) {
+               switch( pMod->mod_op & LDAP_MOD_OP ) {
                case LDAP_MOD_ADD:
                if ( mod->sml_bvalues == NULL ) {
                        rs.sr_err = LDAP_PROTOCOL_ERROR;