diff options
author | Ken Murchison <murch@fastmail.com> | 2022-01-19 10:33:44 -0500 |
---|---|---|
committer | Ken Murchison <murch@fastmail.com> | 2022-01-19 10:33:44 -0500 |
commit | 5d9ddac57dac43c516d2fbde03eedf75e653b51d (patch) | |
tree | e943b895bfebe76feb75ab2d365798ed86a632f1 | |
parent | 3af0b374dd8931adb289f5bf3805d683221b02d9 (diff) | |
download | libical-git-RFC9073_RFC9074.tar.gz |
icalrestriction.c.in: special restriction callbacks can be called with prop == NULLRFC9073_RFC9074
-rw-r--r-- | src/libical/icalrestriction.c.in | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libical/icalrestriction.c.in b/src/libical/icalrestriction.c.in index 77a59f14..fafa23a0 100644 --- a/src/libical/icalrestriction.c.in +++ b/src/libical/icalrestriction.c.in @@ -210,8 +210,9 @@ static const char *icalrestriction_no_dtend(const icalrestriction_record * rec, icalcomponent *comp, icalproperty *prop) { _unused(rec); - _unused(prop); - if (icalcomponent_get_first_property(comp, ICAL_DTEND_PROPERTY)) { + + if (prop != NULL && + icalcomponent_get_first_property(comp, ICAL_DTEND_PROPERTY)) { return "Failed iTIP restrictions for DTEND property. " "The component must not have both DURATION and DTEND"; @@ -224,10 +225,15 @@ static const char *icalrestriction_no_duration(const icalrestriction_record * re icalcomponent *comp, icalproperty *prop) { _unused(rec); - _unused(comp); - _unused(prop); - /* _no_dtend takes care of this one */ + if (prop != NULL && + icalcomponent_get_first_property(comp, ICAL_DURATION_PROPERTY)) { + return + "Failed iTIP restrictions for DURATION property. " + "The component must not have both DTEND and DURATION"; + } + + return 0; } |