aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
authorJesse Pavel <jpavel@src.gnome.org>2000-10-28 04:34:53 +0800
committerJesse Pavel <jpavel@src.gnome.org>2000-10-28 04:34:53 +0800
commit7b8d4345fe3671e0d6fe0dab23ba1212d564a172 (patch)
treedf97567630f49d4c55f599cce56b3b9bc2a53a1b /libical/src
parent78a43af4b23250dc56e4a971915f274ab0da377d (diff)
downloadgsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.gz
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.bz2
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.lz
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.xz
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.zst
gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.zip
Fixed icalproperty_remove_parameter().
svn path=/trunk/; revision=6239
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icalproperty.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/libical/src/libical/icalproperty.c b/libical/src/libical/icalproperty.c
index 1040215108..b63c8a960a 100644
--- a/libical/src/libical/icalproperty.c
+++ b/libical/src/libical/icalproperty.c
@@ -382,9 +382,26 @@ icalproperty_add_parameter (icalproperty* prop,icalparameter* parameter)
void
icalproperty_remove_parameter (icalproperty* prop, icalparameter_kind kind)
{
+ struct icalproperty_impl *p = (struct icalproperty_impl*)prop;
+ icalparameter *param;
+ pvl_elem elem;
+
icalerror_check_arg_rv((prop!=0),"prop");
- assert(0); /* This routine is not implemented */
+ /* This routine is now implemented, so disregard the following
+ assertion. */
+ /* assert(0); */
+
+ elem = pvl_head (p->parameters);
+ while (elem != NULL) {
+ param = (icalparameter *)pvl_data (elem);
+ if (icalparameter_isa (param) == kind) {
+ pvl_remove (p->parameters, elem);
+ icalparameter_free (param);
+ break;
+ }
+ elem = pvl_next (elem);
+ }
}