Commit 281627d8 authored by Luke Howard's avatar Luke Howard
Browse files

Do not attempt to map positive error codes returned by plugins to

negative error codes.

Plugins should never return positive error codes except in the case
of bind pre-operation plugins, where they should return SLAPI_BIND_XXX.

This should fix ITS #2616 ...
parent 2f5fbeb1
......@@ -637,8 +637,11 @@ doPluginFNs(
* failure (confirmed with SLAPI specification).
*/
if ( !SLAPI_PLUGIN_IS_POST_FN( funcType ) && rc != 0 ) {
/* make sure errors are negative */
if ( rc > 0 ) rc = 0 - rc;
/*
* Plugins generally return negative error codes
* to indicate failure, although in the case of
* bind plugins they may return SLAPI_BIND_xxx
*/
break;
}
}
......
......@@ -330,7 +330,7 @@ int slapi_x_clear_object_extensions(int objecttype, void *object)
}
for ( i = 0; i < registered_extensions.extensions[objecttype].count; i++ ) {
newExtension( eblock, objecttype, object, parent, i );
newExtension( eblock, objecttype, object, parent, i );
}
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment