summaryrefslogtreecommitdiff
path: root/plugin/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/plugin.c')
-rw-r--r--plugin/plugin.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/plugin/plugin.c b/plugin/plugin.c
index 63158a3..329f6b5 100644
--- a/plugin/plugin.c
+++ b/plugin/plugin.c
@@ -151,7 +151,6 @@ lowercase (char *data)
static int
pre_modify (Slapi_PBlock *pb)
{
- LDAPMod **mods;
char *dn;
int rc;
@@ -162,12 +161,9 @@ pre_modify (Slapi_PBlock *pb)
return_val_if_fail (rc >= 0 && dn, -1);
dn = slapi_ch_strdup (dn);
slapi_dn_normalize_case (dn);
-
- rc = slapi_pblock_get (pb, SLAPI_MODIFY_MODS, &mods);
- return_val_if_fail (rc >= 0 && mods, -1);
/* Send off to components */
- rc = suffix_pre_modify (dn, mods);
+ rc = suffix_pre_modify (pb, dn);
slapi_ch_free_string (&dn);
return rc;
@@ -177,24 +173,18 @@ static int
pre_add (Slapi_PBlock *pb)
{
char *dn;
- int rc, code;
+ int rc;
return_val_if_fail (pb, -1);
- /* Make sure it was successful, don't process errors */
- rc = slapi_pblock_get (pb, SLAPI_RESULT_CODE, &code);
- return_val_if_fail (rc >= 0, -1);
- if (code != LDAP_SUCCESS)
- return 0;
-
/* Get out the DN and normalize it */
rc = slapi_pblock_get (pb, SLAPI_ADD_TARGET, &dn);
return_val_if_fail (rc >= 0 && dn, -1);
dn = slapi_ch_strdup (dn);
slapi_dn_normalize_case (dn);
-
+
/* Send off to components */
- rc = suffix_pre_add (dn);
+ rc = suffix_pre_add (pb, dn);
slapi_ch_free_string (&dn);
return rc;