diff options
author | Dmitri Pal <dpal@redhat.com> | 2009-07-15 15:17:53 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-07-16 16:29:52 -0400 |
commit | 08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d (patch) | |
tree | 410a86adb5653204f0f8f476e377a8a89c803102 /common/elapi | |
parent | 699f1a55fd6358f04ce90d44380f1a7cb75614b6 (diff) | |
download | sssd-08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d.tar.gz sssd-08edf9d6445f3962bf31d5f3c9fa5c9cb363c30d.tar.bz2 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')
-rw-r--r-- | common/elapi/elapi_event.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/common/elapi/elapi_event.c b/common/elapi/elapi_event.c index 9322f821..fe3b3a5e 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); |