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 ...
This commit is contained in:
Luke Howard 2003-08-11 09:55:45 +00:00
parent 2f5fbeb180
commit 281627d81d
2 changed files with 6 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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;