valid = validate_recipients(attendees_string);
CtdlSubmitMsg(msg, valid, "");
CtdlFreeMessage(msg);
+ free (valid);
}
}
free(serialized_request);
-
-
-
+void serv_calendar_destroy(void)
+{
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
+ icaltimezone_free_builtin_timezones();
+#endif
+}
*/
char *serv_bio_init(void);
char *serv_calendar_init(void);
+void serv_calendar_destroy(void);
char *serv_notes_init(void);
char *serv_ldap_init(void);
char *serv_chat_init(void);
void sysdep_master_cleanup(void) {
struct ServiceFunctionHook *serviceptr;
+///// DestroyWorkerList();
/*
* close all protocol master sockets
*/
#ifdef HAVE_OPENSSL
destruct_ssl();
#endif
+ serv_calendar_destroy();
CtdlDestroyProtoHooks();
CtdlDestroyDeleteHooks();
CtdlDestroyXmsgHooks();
CtdlDestroyFixedOutputHooks();
CtdlDestroySessionHooks();
CtdlDestroyServiceHook();
- DestroyWorkerList();
}
void DestroyWorkerList(void)
{
+ struct CitContext *ptr; /* general-purpose utility pointer */
+ struct CitContext *rem = NULL; /* list of sessions to be destroyed */
+
+ begin_critical_section(S_SESSION_TABLE);
+ ptr = ContextList;
+ while (ptr != NULL){
+ /* Remove the session from the active list */
+ rem = ptr->next;
+ --num_sessions;
+
+ lprintf(CTDL_DEBUG, "Purging session %d\n", rem->cs_pid);
+ end_critical_section(S_SESSION_TABLE);
+ RemoveContext(ptr);
+ begin_critical_section(S_SESSION_TABLE);
+ free (ptr);
+ ptr = rem;
+ }
+ end_critical_section(S_SESSION_TABLE);
+
struct worker_node *cur, *p;
cur = worker_list;
while (cur != NULL)