diff options
author | Stef Walter <stef@memberwebs.com> | 2009-07-31 15:52:53 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2009-07-31 15:52:53 +0000 |
commit | 5fd6cf69da7ff8d512dfc0edd9d1996c4f6e3e87 (patch) | |
tree | 98e0a5152bc5a5a9a7ffa8afb9e859229e9faa9d /plugin/plugin.c | |
parent | 9b6fd905f2c2aaede608b3525d27c2c75ce29e1d (diff) |
Basic code structure in place
git-svn-id: http://internal-svn-server/svn/network/slapi-suffix@1513 96c7dce7-e4ff-0310-afa0-05b99c2e9643
Diffstat (limited to 'plugin/plugin.c')
-rw-r--r-- | plugin/plugin.c | 18 |
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; |