X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fnetwork%2Fserv_network.c;h=1f610f258f67f2bcb41ddc73d04b04f6a93a6f1c;hb=c71df26b9d35c07eb9c1322a7e83caa86337ad82;hp=4434044de20cfd8134067b0d89199aa23d49b713;hpb=6150ec8f254e46e453251cac570b6d7816294a9a;p=citadel.git diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index 4434044de..1f610f258 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -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-2019 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); @@ -228,7 +225,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; @@ -318,43 +314,13 @@ void network_do_queue(void) } -void network_logout_hook(void) -{ - CitContext *CCC = MyContext(); - - /* - * If we were talking to a network node, we're not anymore... - */ - if (!IsEmptyStr(CCC->net_node)) { - CtdlNetworkTalkingTo(CCC->net_node, strlen(CCC->net_node), NTT_REMOVE); - CCC->net_node[0] = '\0'; - } -} - - -void network_cleanup_function(void) -{ - struct CitContext *CCC = CC; - - if (!IsEmptyStr(CCC->net_node)) { - CtdlNetworkTalkingTo(CCC->net_node, strlen(CCC->net_node), NTT_REMOVE); - CCC->net_node[0] = '\0'; - } -} - - /* * Module entry point */ - - CTDL_MODULE_INIT(network) { if (!threading) { - CtdlFillSystemContext(&networker_spool_CC, "CitNetSpool"); - CtdlRegisterSessionHook(network_cleanup_function, EVT_STOP, PRIO_STOP + 30); - CtdlRegisterSessionHook(network_logout_hook, EVT_LOGOUT, PRIO_LOGOUT + 10); CtdlRegisterRoomHook(network_room_handler); CtdlRegisterCleanupHook(destroy_network_queue_room_locked); CtdlRegisterSessionHook(network_do_queue, EVT_TIMER, PRIO_QUEUE + 10);