jabberd2
2.2.16
|
initialisation More...
Go to the source code of this file.
Functions | |
static void | _sm_signal (int signum) |
static void | _sm_signal_hup (int signum) |
static void | _sm_signal_usr1 (int signum) |
static void | _sm_signal_usr2 (int signum) |
static void | _sm_pidfile (sm_t sm) |
store the process id | |
static void | _sm_config_expand (sm_t sm) |
pull values out of the config file | |
static void | _sm_hosts_expand (sm_t sm) |
static int | _sm_router_connect (sm_t sm) |
JABBER_MAIN ("jabberd2sm","Jabber 2 Session Manager","Jabber Open Source Server: Session Manager","jabberd2router\0") | |
Variables | |
static sig_atomic_t | sm_shutdown = 0 |
static sig_atomic_t | sm_logrotate = 0 |
static sm_t | sm = NULL |
static char * | config_file |
static void _sm_signal | ( | int | signum | ) | [static] |
Definition at line 36 of file main.c.
References sm_shutdown, and sm_lost_router.
Referenced by JABBER_MAIN().
static void _sm_signal_hup | ( | int | signum | ) | [static] |
Definition at line 42 of file main.c.
References log_write(), sm_st::log, sm_logrotate, config_new(), config_load(), config_file, config_free(), sm_st::config, mm_free(), sm_st::mm, and mm_new().
Referenced by JABBER_MAIN().
static void _sm_signal_usr1 | ( | int | signum | ) | [static] |
static void _sm_signal_usr2 | ( | int | signum | ) | [static] |
static void _sm_pidfile | ( | sm_t | sm | ) | [static] |
store the process id
Definition at line 75 of file main.c.
References config_get_one(), sm_st::config, log_write(), and sm_st::log.
Referenced by JABBER_MAIN().
static void _sm_config_expand | ( | sm_t | sm | ) | [static] |
pull values out of the config file
Definition at line 103 of file main.c.
References set_debug_log_from_config(), sm_st::config, sm_st::id, config_get_one(), sm_st::router_ip, sm_st::router_port, j_atoi(), sm_st::router_user, sm_st::router_pass, sm_st::router_pemfile, sm_st::retry_init, sm_st::retry_lost, sm_st::retry_sleep, sm_st::log_type, log_STDOUT, config_get(), config_get_attr(), log_FILE, log_SYSLOG, sm_st::log_facility, sm_st::log_ident, sm_st::query_rate_total, config_elem_st::values, sm_st::query_rate_seconds, j_attr(), config_elem_st::attrs, and sm_st::query_rate_wait.
Referenced by JABBER_MAIN().
static void _sm_hosts_expand | ( | sm_t | sm | ) | [static] |
Definition at line 164 of file main.c.
References config_get(), sm_st::config, xhash_put(), sm_st::hosts, pstrdup(), xhash_pool(), sm_st::id, log_write(), sm_st::log, config_elem_st::nvalues, and config_elem_st::values.
Referenced by JABBER_MAIN().
static int _sm_router_connect | ( | sm_t | sm | ) | [static] |
Definition at line 194 of file main.c.
References log_write(), sm_st::log, sm_st::router_ip, sm_st::router_port, sm_st::fd, mio_connect, sm_st::mio, sm_mio_callback(), sm_lost_router, MIO_STRERROR, MIO_ERROR, sx_new(), sm_sx_callback(), and sx_client_init().
Referenced by JABBER_MAIN().
JABBER_MAIN | ( | "jabberd2sm" | , |
"Jabber 2 Session Manager" | , | ||
"Jabber Open Source Server: Session Manager" | , | ||
"jabberd2router\0" | |||
) |
Definition at line 211 of file main.c.
References jabber_signal(), _sm_signal(), _sm_signal_hup(), _sm_signal_usr1(), _sm_signal_usr2(), sm_st::config, config_new(), config_file, set_debug_flag(), config_free(), config_load_with_id(), _sm_config_expand(), sm_st::log, log_new(), sm_st::log_type, sm_st::log_ident, sm_st::log_facility, log_write(), sm_st::id, _sm_pidfile(), sm_signature(), sm_st::st, sm_st::xmlns, xhash_new(), xhash_put(), uri_AUTH, ns_AUTH, uri_REGISTER, ns_REGISTER, uri_ROSTER, ns_ROSTER, uri_AGENTS, ns_AGENTS, uri_DELAY, ns_DELAY, uri_BROWSE, ns_BROWSE, uri_EVENT, ns_EVENT, uri_GATEWAY, ns_GATEWAY, uri_EXPIRE, ns_EXPIRE, uri_SEARCH, ns_SEARCH, uri_DISCO, ns_DISCO, uri_DISCO_ITEMS, ns_DISCO_ITEMS, uri_DISCO_INFO, ns_DISCO_INFO, sm_st::xmlns_refcount, sm_st::features, sm_st::acls, aci_load(), feature_register(), sm_st::mm, mm_new(), sm_st::signature, sm_st::sessions, sm_st::users, sm_st::query_rates, sm_st::sx_env, sx_env_new(), sm_st::router_pemfile, sm_st::sx_ssl, sx_env_plugin(), sx_ssl_init(), sm_st::sx_sasl, sx_sasl_init(), sm_st::mio, mio_new(), MIO_MAXFD, sm_st::hosts, _sm_hosts_expand(), sm_st::retry_left, sm_st::retry_init, _sm_router_connect(), sm_shutdown, mio_run, sm_logrotate, set_debug_log_from_config(), log_free(), sm_lost_router, sm_st::retry_sleep, sm_st::router, sx_free(), pool_stat(), xhash_iter_first(), xhash_iter_get(), sm_c2s_action(), sess_end(), xhash_iter_next(), xhash_free(), sm_st::fd, mio_close, mio_free, mm_free(), aci_unload(), and sx_env_free().
sig_atomic_t sm_shutdown = 0 [static] |
Definition at line 31 of file main.c.
Referenced by _sm_signal(), and JABBER_MAIN().
sig_atomic_t sm_logrotate = 0 [static] |
Definition at line 32 of file main.c.
Referenced by _sm_signal_hup(), and JABBER_MAIN().
Definition at line 33 of file main.c.
Referenced by sm_sx_callback(), sm_mio_callback(), _user_alloc(), mm_new(), _session_in_router(), and pkt_new().
char* config_file [static] |
Definition at line 34 of file main.c.
Referenced by JABBER_MAIN(), and _sm_signal_hup().