// Compare function for "time-range" tests (RFC4791 section 9.9)
// Returns nonzero if the supplied icalcomponent occurs within the specified time range
-int caldav_time_range_filter_matches(icalcomponent *cal, char *start, char *end) {
+int caldav_time_range_filter_matches(icalcomponent *cal, char *start_str, char *end_str) {
- TRACE;
- syslog(LOG_DEBUG, "Does this %s fall between %s and %s ?",
+
+ struct icaltimetype start = (start_str ? icaltime_from_string(start_str) : icaltime_null_time());
+ struct icaltimetype end = (end_str ? icaltime_from_string(end_str) : icaltime_null_time());
+
+ syslog(LOG_DEBUG, "\033[7mcaldav_time_range_filter_matches()\033[0m : Does this %s fall between %s and %s ?",
icalcomponent_kind_to_string(icalcomponent_isa(cal)),
start,
end
);
- return(1);
+ return(0); // reject everything for now
}