Hello everyone.
I'm trying to perform an internal search from a PRE_SEARCH plugin, but I get this error in the logs:allow_operation: component identity is NULLI think it has some trouble with the slapi_componentid. I declare it in my plugin with this:static Slapi_ComponentId * plugin_id = NULL;Am I doing something wrong? Any suggestion to resolve this?Thanks to all from now. -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor: Impazzisci per Vasco? Scarica ora il mondo che vorrei sul cellulare Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7750&d=20080728
On Mon, Jul 28, 2008 at 11:19:15AM +0200, Mac.gp wrote:
Hello everyone. I'm trying to perform an internal search from a PRE_SEARCH plugin, but I get this error in the logs: allow_operation: component identity is NULL I think it has some trouble with the slapi_componentid. I declare it in my plugin with this: static Slapi_ComponentId * plugin_id = NULL; Am I doing something wrong? Any suggestion to resolve this? Thanks to all from now.
You need to pass in a valid value -- I'd suggest reading the SLAPI_PLUGIN_IDENTITY value from the Slapi_PBlock which is passed to your module's initialization function, and saving it (along with whatever else you like) for future use as your SLAPI_PLUGIN_PRIVATE value.
The value that SLAPI_PLUGIN_IDENTITY has when your search function is called is the one which was passed in by the module that initiated the search. Your own module will be called (along with others) to satisfy your internal searches, so to avoid recursion, you'll probably want to compare the pointer value that the Slapi_PBlock contains when the function is called to the value for your module, and then return early if they're the same.
HTH,
Nalin
389-users@lists.fedoraproject.org