Timothy Pearson 11 years ago
commit c1ea876011

@ -28,5 +28,5 @@ int plugin_init (Slapi_PBlock *pb);
int internal_plugin_init (Slapi_PBlock *pb); int internal_plugin_init (Slapi_PBlock *pb);
__attribute__ ((visibility ("default"))) int plugin_init (Slapi_PBlock *pb) { __attribute__ ((visibility ("default"))) int plugin_init (Slapi_PBlock *pb) {
internal_plugin_init(pb); return internal_plugin_init(pb);
} }

@ -65,8 +65,9 @@ post_modify (Slapi_PBlock *pb)
/* Make sure it was successful, don't process errors */ /* Make sure it was successful, don't process errors */
rc = slapi_pblock_get (pb, SLAPI_RESULT_CODE, &code); rc = slapi_pblock_get (pb, SLAPI_RESULT_CODE, &code);
return_val_if_fail (rc >= 0, -1); return_val_if_fail (rc >= 0, -1);
if (code != LDAP_SUCCESS) if (code != LDAP_SUCCESS) {
return 0; return 0;
}
/* Get out the DN and normalize it */ /* Get out the DN and normalize it */
rc = slapi_pblock_get (pb, SLAPI_MODIFY_TARGET, &dn); rc = slapi_pblock_get (pb, SLAPI_MODIFY_TARGET, &dn);
@ -134,7 +135,7 @@ plugin_destroy (Slapi_PBlock *pb)
extern "C" int internal_plugin_init (Slapi_PBlock *pb) extern "C" int internal_plugin_init (Slapi_PBlock *pb)
{ {
char **argv = NULL, *arg, *value; char **argv = NULL;
int argc = 0; int argc = 0;
int rc, i; int rc, i;
@ -174,19 +175,19 @@ extern "C" int internal_plugin_init (Slapi_PBlock *pb)
if (slapi_pblock_set (pb, SLAPI_PLUGIN_VERSION, (void*)plugin_compat_ver) != 0 || if (slapi_pblock_set (pb, SLAPI_PLUGIN_VERSION, (void*)plugin_compat_ver) != 0 ||
slapi_pblock_set (pb, SLAPI_PLUGIN_DESCRIPTION, (void*)(&plugin_description)) != 0 || slapi_pblock_set (pb, SLAPI_PLUGIN_DESCRIPTION, (void*)(&plugin_description)) != 0 ||
slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)plugin_destroy)) { slapi_pblock_set (pb, SLAPI_PLUGIN_DESTROY_FN, (void*)plugin_destroy)) {
log_plugin ("error registering plugin"); log_plugin ("error registering plugin %s\n", PLUGIN_NAME);
return -1; return -1;
} }
ldapManagerObject = new LDAPManager(realmname, "ldapi://"); ldapManagerObject = new LDAPManager(realmname, "ldapi://");
/* Setup the entry add/mobify functions */ /* Setup the entry add/modify functions */
if (slapi_pblock_set (pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void*)post_modify) != 0) { if (slapi_pblock_set (pb, SLAPI_PLUGIN_POST_MODIFY_FN, (void*)post_modify) != 0) {
log_plugin ("error registering plugin hooks"); log_plugin ("error registering plugin hooks for %s\n", PLUGIN_NAME);
return -1; return -1;
} }
log_plugin ("%s initialized", PLUGIN_NAME); log_plugin ("%s initialized\n", PLUGIN_NAME);
return 0; return 0;
} }

@ -1 +1 @@
Subproject commit 4027b878fb556a51ed29affd578e78aa70997480 Subproject commit 65ecce459d54e772303052de50d08557ba9cc7ed
Loading…
Cancel
Save