* since we now require a new libical version, remove glitch in availability.
authorWilfried Göesgens <willi@citadel.org>
Sat, 1 Dec 2007 12:26:34 +0000 (12:26 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sat, 1 Dec 2007 12:26:34 +0000 (12:26 +0000)
* configure now requires libical-0.30
* webserver shuts down libical, valgrind doesn't mention ical anymore now.

webcit/availability.c
webcit/configure.ac
webcit/debian/control
webcit/webserver.c

index ce15c78356f2384a2baaa71253b547d35fcf5861..bce91e02f8e39b62337e690f236b93464b36c4bd 100644 (file)
@@ -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. */
index d8c30e82d586008e26d8b4aab3a8a9ece4e5bc70..da9ebee753c8a8e5fe451f54d8847c5fa14a4648 100644 (file)
@@ -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);
 }
index 01edaad8ef26d1b476127cbecf1a82c2fb7c6ee7..7f35f1baad5815f646674e06cdf94c638be9aedf 100644 (file)
@@ -2,7 +2,7 @@ Source: webcit
 Section: web
 Priority: optional
 Maintainer: Wilfried Goesgens <w.goesgens@outgesourced.org>
-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
 
index 89238741a1dce03151bff511c862d8ad83be2ae0..5c84752e963cbbc7680045112f3697e7e2fddacd 100644 (file)
@@ -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);
                        }