/*
- * 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.
#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);
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;
}
-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);