From: Wilfried Göesgens Date: Sat, 1 Dec 2007 12:26:34 +0000 (+0000) Subject: * since we now require a new libical version, remove glitch in availability. X-Git-Tag: v7.86~2702 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=0cc557f8d635bfadb6049ae2cfa57969e8296f06;p=citadel.git * since we now require a new libical version, remove glitch in availability. * configure now requires libical-0.30 * webserver shuts down libical, valgrind doesn't mention ical anymore now. --- diff --git a/webcit/availability.c b/webcit/availability.c index ce15c7835..bce91e02f 100644 --- a/webcit/availability.c +++ b/webcit/availability.c @@ -48,59 +48,6 @@ icalcomponent *get_freebusy_for_user(char *who) { } -/* TODO: temporary copy from libical, apply this patch to libical... */ -int webcit_icaltime_compare(const struct icaltimetype a_in, const struct icaltimetype b_in) -{ - struct icaltimetype a, b; - - a = icaltime_convert_to_zone(a_in, icaltimezone_get_utc_timezone()); - b = icaltime_convert_to_zone(b_in, icaltimezone_get_utc_timezone()); - - if (a.year > b.year) - return 1; - else if (a.year < b.year) - return -1; - - else if (a.month > b.month) - return 1; - else if (a.month < b.month) - return -1; - - else if (a.day > b.day) - return 1; - else if (a.day < b.day) - return -1; - - /* if both are dates, we are done */ - if (a.is_date && b.is_date) - return 0; - - /* else, if only one is a date (and we already know the date part is equal), - then the other is greater */ - else if (b.is_date) - return 1; - else if (a.is_date) - return -1; - - else if (a.hour > b.hour) - return 1; - else if (a.hour < b.hour) - return -1; - - else if (a.minute > b.minute) - return 1; - else if (a.minute < b.minute) - return -1; - - else if (a.second > b.second) - return 1; - else if (a.second < b.second) - return -1; - - return 0; -} - - /** * \brief Check if dates are overlapping * Check to see if two events overlap. @@ -157,11 +104,11 @@ int ical_ctdl_is_overlap( if (icaltime_is_null_time(t2end)) return(0); /** If event 1 ends before event 2 starts, we're in the clear. */ - if (webcit_icaltime_compare(t1end, t2start) <= 0) return(0); + if (icaltime_compare(t1end, t2start) <= 0) return(0); // lprintf(9, "first passed\n"); /** If event 2 ends before event 1 starts, we're also ok. */ - if (webcit_icaltime_compare(t2end, t1start) <= 0) return(0); + if (icaltime_compare(t2end, t1start) <= 0) return(0); // lprintf(9, "second passed\n"); /** Otherwise, they overlap. */ diff --git a/webcit/configure.ac b/webcit/configure.ac index d8c30e82d..da9ebee75 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -138,11 +138,11 @@ main() { sscanf(ICAL_VERSION, "%d.%d", &major, &minor); v = 100*major + minor; printf("libical version: %i\n", v); - if (v >= 24) { + if (v >= 30) { printf("This version is ok.\n"); return(0); } - printf("libical 0.24 or newer required.\n"); + printf("libical 0.30 or newer required.\n"); printf("Citadel will be built without calendar support.\n"); return(1); } diff --git a/webcit/debian/control b/webcit/debian/control index 01edaad8e..7f35f1baa 100644 --- a/webcit/debian/control +++ b/webcit/debian/control @@ -2,7 +2,7 @@ Source: webcit Section: web Priority: optional Maintainer: Wilfried Goesgens -Build-Depends: debhelper (>= 4), po-debconf, libical-dev, gettext, locales, +Build-Depends: debhelper (>= 4), po-debconf, libical-dev (>=0.30), gettext, locales, libcitadel-dev Standards-Version: 3.7.2 diff --git a/webcit/webserver.c b/webcit/webserver.c index 89238741a..5c84752e9 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -949,6 +949,8 @@ void worker_entry(void) sleeeeeeeeeep(1); // wait so some others might finish... lprintf(2, "master shutdown: cleaning up sessions\n"); do_housekeeping(); + free_zone_directory (); + icaltimezone_release_zone_tab (); lprintf(2, "master shutdown exiting!.\n"); exit(0); }