* Finished removing all the "dynamic session data" stuff in order to
[citadel.git] / citadel / serv_calendar.c
index 65ec59f7ac9d8d378409b92aa05bd1c0c65ac9cf..7d28b940377618b40cc75e5a7fa3b8fe741b3222 100644 (file)
@@ -1883,10 +1883,14 @@ int ical_obj_aftersave(struct CtdlMessage *msg)
 
 
 void ical_session_startup(void) {
-       CtdlAllocUserData(SYM_CIT_ICAL, sizeof(struct cit_ical));
+       CIT_ICAL = malloc(sizeof(struct cit_ical));
        memset(CIT_ICAL, 0, sizeof(struct cit_ical));
 }
 
+void ical_session_shutdown(void) {
+       free(CIT_ICAL);
+}
+
 
 #endif /* CITADEL_WITH_CALENDAR_SERVICE */
 
@@ -1901,6 +1905,7 @@ char *serv_calendar_init(void)
        CtdlRegisterSessionHook(ical_create_room, EVT_LOGIN);
        CtdlRegisterProtoHook(cmd_ical, "ICAL", "Citadel iCal commands");
        CtdlRegisterSessionHook(ical_session_startup, EVT_START);
+       CtdlRegisterSessionHook(ical_session_shutdown, EVT_STOP);
 #endif
        return "$Id$";
 }