No more cleanup hooks. The OS can reclaim memory better than we can. We want to...
[citadel.git] / citadel / modules / network / serv_network.c
index 36b23527a371d9545676cf81f00cc03b49c7f6b3..eeca28afc46a2a40d4107e0711602012fa5465e6 100644 (file)
@@ -1,8 +1,7 @@
 /*
- * This module handles shared rooms, inter-Citadel mail, and outbound
- * mailing list processing.
+ * This module handles network mail and mailing list processing.
  *
- * Copyright (c) 2000-2018 by the citadel.org team
+ * Copyright (c) 2000-2021 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
@@ -78,8 +77,6 @@
 #include "netspool.h"
 #include "netmail.h"
 
-struct CitContext networker_spool_CC;
-
 /* comes from lookup3.c from libcitadel... */
 extern uint32_t hashlittle( const void *key, size_t length, uint32_t initval);
 
@@ -194,13 +191,6 @@ void destroy_network_queue_room(RoomProcList *rplist)
        }
 }
 
-void destroy_network_queue_room_locked (void)
-{
-       begin_critical_section(S_RPLIST);
-       destroy_network_queue_room(rplist);
-       end_critical_section(S_RPLIST);
-}
-
 
 /*
  * network_do_queue()
@@ -228,7 +218,6 @@ void network_do_queue(void)
                syslog(LOG_DEBUG, "network: full processing in %ld seconds.", CtdlGetConfigLong("c_net_freq") - (time(NULL)- last_run));
        }
 
-       become_session(&networker_spool_CC);
        begin_critical_section(S_RPLIST);
        RL.rplist = rplist;
        rplist = NULL;
@@ -321,15 +310,11 @@ void network_do_queue(void)
 /*
  * Module entry point
  */
-
-
 CTDL_MODULE_INIT(network)
 {
        if (!threading)
        {
-               CtdlFillSystemContext(&networker_spool_CC, "CitNetSpool");
                CtdlRegisterRoomHook(network_room_handler);
-               CtdlRegisterCleanupHook(destroy_network_queue_room_locked);
                CtdlRegisterSessionHook(network_do_queue, EVT_TIMER, PRIO_QUEUE + 10);
        }
        return "network";