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 | 9a62413058e0f690d81da2c8e5addc464adab680 (patch) | |
tree | 70d23b1c27c80e8f411305c9c41edc80deb48cfd /elapi | |
parent | 98451c5e9342d13129886b735cb82f7f7596f357 (diff) | |
download | ding-libs2-9a62413058e0f690d81da2c8e5addc464adab680.tar.gz ding-libs2-9a62413058e0f690d81da2c8e5addc464adab680.tar.xz ding-libs2-9a62413058e0f690d81da2c8e5addc464adab680.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 'elapi')
-rw-r--r-- | elapi/elapi_event.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/elapi/elapi_event.c b/elapi/elapi_event.c index 9322f82..fe3b3a5 100644 --- a/elapi/elapi_event.c +++ b/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); |