summaryrefslogtreecommitdiffstats
path: root/common/elapi/elapi_event.c
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2009-07-15 15:17:53 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-07-16 16:29:52 -0400
commit08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d (patch)
tree410a86adb5653204f0f8f476e377a8a89c803102 /common/elapi/elapi_event.c
parent699f1a55fd6358f04ce90d44380f1a7cb75614b6 (diff)
downloadsssd-08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d.tar.gz
sssd-08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d.tar.xz
sssd-08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d.zip
COLLECTION Add remove item functions
The remove functions extract and remove items, they act differently from the way the delete_property function works. The new functions allow deletion with the disposition while the delete_property only deletes specified property. The delete_property function is left as is since there are some use cases when it is more efficient to use it rather than new remove_item_xxx ones.
Diffstat (limited to 'common/elapi/elapi_event.c')
-rw-r--r--common/elapi/elapi_event.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/elapi/elapi_event.c b/common/elapi/elapi_event.c
index 9322f8217..fe3b3a5e3 100644
--- a/common/elapi/elapi_event.c
+++ b/common/elapi/elapi_event.c
@@ -732,11 +732,12 @@ static int process_arg_list(struct collection_item *col,
else {
/* Remove case */
while (error != ENOENT) {
- error = col_delete_property(col,
- propcopy,
- COL_TYPE_ANY,
- COL_TRAVERSE_DEFAULT);
-
+ error = col_remove_item(col,
+ NULL,
+ COL_DSP_FIRSTDUP,
+ propcopy,
+ 0,
+ COL_TYPE_ANY);
if ((error) && (error != ENOENT)) {
TRACE_ERROR_STRING("Error deleting property", propcopy);
free(propcopy);