X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fserver%2Fmodules%2Fcalendar%2Fical_ctdl_is_overlap.c;h=d980c554b53645faf385fa786a3908f0eb50dbe0;hp=6902fd04d1b9edca1f8b2b16258dc1c551c9410f;hb=fc3a564c7bba86a29503b39bdd8512801116e70e;hpb=3292f7f60e2f42173b0b233e019ddc0df72d38fa diff --git a/citadel/server/modules/calendar/ical_ctdl_is_overlap.c b/citadel/server/modules/calendar/ical_ctdl_is_overlap.c index 6902fd04d..d980c554b 100644 --- a/citadel/server/modules/calendar/ical_ctdl_is_overlap.c +++ b/citadel/server/modules/calendar/ical_ctdl_is_overlap.c @@ -8,6 +8,7 @@ #include #include +#include // Check to see if two events overlap. Returns nonzero if they do. int ical_ctdl_is_overlap( @@ -36,6 +37,16 @@ int ical_ctdl_is_overlap( } } +#ifdef DEBUG_ICAL_OVERLAP + syslog(LOG_DEBUG, "Comparing t1start=%s,t1end=%s to t2start=%s,t2end=%s", + icaltime_as_ical_string_r(t1start), + icaltime_as_ical_string_r(t1end), + icaltime_as_ical_string_r(t2start), + icaltime_as_ical_string_r(t2end) + ); +#endif + + if (icaltime_is_null_time(t2end)) { memcpy(&t2end, &t2start, sizeof(struct icaltimetype)); } @@ -57,13 +68,6 @@ int ical_ctdl_is_overlap( return(1); } -#ifdef DEBUG_ICAL_OVERLAP - syslog(LOG_DEBUG, "Comparing t1start %d:%d t1end %d:%d t2start %d:%d t2end %d:%d", - t1start.hour, t1start.minute, t1end.hour, t1end.minute, - t2start.hour, t2start.minute, t2end.hour, t2end.minute - ); -#endif - // Now check for overlaps using date *and* time. // If event 1 ends before event 2 starts, there is no match.