]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slapi/slapi_utils.c
Heads up: fix for SLAPI compliance: when calling slapi_pblock_set() with
[openldap] / servers / slapd / slapi / slapi_utils.c
index bb46f4c4c6e67db64c9a0929b54492d9a0420e63..c9ccbd6dc1fc3b1e1ccbdb1a2eab10f266f9e816 100644 (file)
@@ -2859,6 +2859,7 @@ int slapi_compute_add_evaluator(slapi_compute_callback_t function)
 {
        Slapi_PBlock *pPlugin = NULL;
        int rc;
+       int type = SLAPI_PLUGIN_OBJECT;
 
        pPlugin = slapi_pblock_new();
        if ( pPlugin == NULL ) {
@@ -2866,7 +2867,7 @@ int slapi_compute_add_evaluator(slapi_compute_callback_t function)
                goto done;
        }
 
-       rc = slapi_pblock_set( pPlugin, SLAPI_PLUGIN_TYPE, (void *)SLAPI_PLUGIN_OBJECT );
+       rc = slapi_pblock_set( pPlugin, SLAPI_PLUGIN_TYPE, (void *)&type );
        if ( rc != LDAP_SUCCESS ) {
                goto done;
        }
@@ -2900,6 +2901,7 @@ int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function)
 {
        Slapi_PBlock *pPlugin = NULL;
        int rc;
+       int type = SLAPI_PLUGIN_OBJECT;
 
        pPlugin = slapi_pblock_new();
        if ( pPlugin == NULL ) {
@@ -2907,7 +2909,7 @@ int slapi_compute_add_search_rewriter(slapi_search_rewrite_callback_t function)
                goto done;
        }
 
-       rc = slapi_pblock_set( pPlugin, SLAPI_PLUGIN_TYPE, (void *)SLAPI_PLUGIN_OBJECT );
+       rc = slapi_pblock_set( pPlugin, SLAPI_PLUGIN_TYPE, (void *)&type );
        if ( rc != LDAP_SUCCESS ) {
                goto done;
        }