Changed "supplied_xxx" to "xxx_in" when we modify.
[citadel.git] / citadel / server / modules / calendar / ical_ctdl_is_overlap.c
index 6902fd04d1b9edca1f8b2b16258dc1c551c9410f..d980c554b53645faf385fa786a3908f0eb50dbe0 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <libical/ical.h>
 #include <string.h>
+#include <syslog.h>
 
 // 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.