#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
+#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "citserver.h"
#include "config.h"
#include "user_ops.h"
#include "room_ops.h"
-#include "tools.h"
#include "msgbase.h"
-#include "mime_parser.h"
#include "internet_addressing.h"
#include "serv_calendar.h"
#include "euidindex.h"
encaps = ical_encapsulate_subcomponent(tmp);
ical_write_to_cal(u, encaps);
icalcomponent_free(tmp);
+ icalcomponent_free(encaps);
return;
}
if (fb == NULL) {
cprintf("%d Internal error: cannot allocate memory.\n",
ERROR + INTERNAL_ERROR);
- icalcomponent_free(encaps);
getroom(&CC->room, hold_rm);
return;
}
*/
CTDL_MODULE_INIT(calendar)
{
+ if (!threading)
+ {
#ifdef CITADEL_WITH_CALENDAR_SERVICE
- CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
- CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
- 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);
- CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);
+ CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
+ CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
+ 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);
+ CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output);
#endif
-
+ }
+
/* return our Subversion id for the Log */
return "$Id$";
}