diff options
author | Jesse Pavel <jpavel@src.gnome.org> | 2000-10-28 04:34:53 +0800 |
---|---|---|
committer | Jesse Pavel <jpavel@src.gnome.org> | 2000-10-28 04:34:53 +0800 |
commit | 7b8d4345fe3671e0d6fe0dab23ba1212d564a172 (patch) | |
tree | df97567630f49d4c55f599cce56b3b9bc2a53a1b /libical/src | |
parent | 78a43af4b23250dc56e4a971915f274ab0da377d (diff) | |
download | gsoc2013-evolution-7b8d4345fe3671e0d6fe0dab23ba1212d564a172.tar.gz 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.c | 19 |
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); + } } |