|
jabberd14
1.6.2
|
main part of the jsm (Jabberd session manager) module More...
#include "jsm.h"Typedefs | |
| typedef void(* | modcall )(jsmi si) |
Functions | |
| void | __jsm_shutdown (xht h, const char *key, void *data, void *arg) |
| void | _jsm_shutdown (xht h, const char *key, void *data, void *arg) |
| void | jsm_shutdown (void *arg) |
| void | jsm (instance i, xmlnode x) |
main part of the jsm (Jabberd session manager) module
This file contains the function that is called by jabberd to load this module jsm() and we load the modules, that are plugged in the session manager
template for the load function of jsm modules
| si | the mapi, that should be used by the modules to interact with jsm |
| void __jsm_shutdown | ( | xht | h, |
| const char * | key, | ||
| void * | data, | ||
| void * | arg | ||
| ) |
xhash walker function to signal all sessions the server shutdown
| h | the hashtable containing all users of a host |
| key | the user |
| data | the user's data |
| arg | unused/ignored |
References js_session_end(), session_struct::next, and udata_struct::sessions.
Referenced by _jsm_shutdown().
| void _jsm_shutdown | ( | xht | h, |
| const char * | key, | ||
| void * | data, | ||
| void * | arg | ||
| ) |
xhash walker function over all hosts of the session manager, used to signal all sessions the server shutdown
| h | the hashtable containing all hosts |
| key | the host |
| data | the table of users on this host |
| arg | unused/ignored |
References __jsm_shutdown(), log_debug2, LOGT_CLEANUP, xhash_free(), and xhash_walk().
Referenced by jsm_shutdown().
startup the jsm module, register the jsm modules in jsm
| i | the instance we are in jabberd |
| x | the <load/> module that instructed the moduleloader to load us |
References jsmi_struct::auth, e_LAST, jsmi_struct::events, history_storage_conf::general, jsmi_struct::history_recv, jsmi_struct::history_sent, jsmi_struct::hosts, HOSTS_PRIME, jsmi_struct::i, instance_struct::id, j_atoi(), j_strcmp(), js_config(), js_packet(), js_users_gc(), log_debug2, LOGT_INIT, instance_struct::module_init_funcs, o_DELIVER, history_storage_conf::offline, instance_struct::p, jsmi_struct::p, pmalloco(), pstrdup(), register_beat(), register_phandler(), register_routing_update_callback(), jsmi_struct::sc_sessions, history_storage_conf::special, jsmi_struct::statefile, jsmi_struct::std_namespace_prefixes, USERS_PRIME, jsmi_struct::xc, xdb_cache(), xhash_new(), xhash_put(), xmlnode_free(), xmlnode_get_attrib_ns(), xmlnode_get_data(), xmlnode_get_list_item(), xmlnode_get_tag(), and xmlnode_get_tags().
| void jsm_shutdown | ( | void * | arg | ) |
callback function where jabberd signals the shutdown of the server
| arg | instance internal jsm data |
References _jsm_shutdown(), e_SHUTDOWN, jsmi_struct::hosts, js_mapi_call(), log_debug2, LOGT_CLEANUP, xhash_free(), and xhash_walk().
1.7.6.1