Where all begins ... this file contains the main function, shutdown routines and signal handlers. More...
#include <pwd.h>#include <grp.h>#include "jabberd.h"#include <popt.h>Data Structures | |
| struct | jabberd_struct |
Functions | |
| void | base_init (pool p) |
| int | configo (int exec) |
| int | configurate (char *file, xht cmd_line, int is_restart) |
| void | deliver_init (pool p) |
| void | deliver_shutdown (void) |
| void | heartbeat_birth (void) |
| void | heartbeat_death (void) |
| void | shutdown_callbacks (void) |
| void | xmlnode_stat () |
| void | deliver_pool_debug () |
| int | main (int argc, const char **argv) |
Variables | |
| xht | debug__zones = NULL |
| int | deliver__flag |
| xmlnode | greymatter__ |
| xht | instance__ids |
| jabberd_struct | jabberd = { NULL, NULL, 0, NULL, NULL } |
Where all begins ... this file contains the main function, shutdown routines and signal handlers.
| void base_init | ( | pool | p | ) |
load all base modules
| p | memory pool, that can be used to register the configuration handlers, must be available for the livetime of jabberd |
References base_accept(), base_connect(), base_dir(), base_file(), base_format(), base_importspool(), base_load(), base_null(), base_stderr(), base_stdout(), base_syslog(), base_to(), and base_unsubscribe().
Referenced by main().
| int configo | ( | int | exec | ) |
execute configuration file
| exec | 0 for the first validation pass, 1 for real startup |
References instance__ids, NTYPE_TAG, xhash_new(), xmlnode_get_firstchild(), xmlnode_get_name(), xmlnode_get_nextsibling(), and xmlnode_get_type().
Referenced by main().
| int configurate | ( | char * | file, | |
| xht | cmd_line, | |||
| int | is_restart | |||
| ) |
parse the configuration file, do inclusions and command line replacements
| file | the file to parse (NULL to use the default) | |
| cmd_line | the command line arguments | |
| is_restart | 0 if it is the initial configuration processing, 1 if it is a restart |
References deliver_config_filter(), messages_set_mapping(), NS_JABBERD_CONFIGFILE, xhash_free(), xhash_get(), xhash_new(), xhash_put(), xmlnode_file(), xmlnode_file_borked(), xmlnode_free(), xmlnode_get_attrib_ns(), xmlnode_get_tags(), xmlnode_insert_cdata(), xmlnode_insert_tag_node(), xmlnode_insert_tag_ns(), and xmlnode_put_attrib_ns().
Referenced by main().
| void deliver_init | ( | pool | p | ) |
initialize the XML delivery system
| p | memory pool that can be used to register config handlers (must be available for the livetime of jabberd) |
References register_config(), and xhash_new().
Referenced by main().
| void deliver_pool_debug | ( | ) |
Referenced by main().
| void deliver_shutdown | ( | void | ) |
free the delivery structures ... this is called when we already have shutdown the server therefore we cannot register it with register_shutdown()
References xhash_free().
Referenced by main().
| void heartbeat_birth | ( | void | ) |
start up the heartbeat
References _new_beat(), heartbeat(), beat_struct::next, and beat_struct::prev.
Referenced by main().
| void heartbeat_death | ( | void | ) |
stop calling hearbeat functions
References beat_struct::next, beat_struct::p, pool_free(), and beat_struct::prev.
Referenced by main().
| int main | ( | int | argc, | |
| const char ** | argv | |||
| ) |
the entry point to jabberd
| argc | the number of arguments on the command line used to start jabberd | |
| argv | array of the arguments |
References base_init(), jabberd_struct::cfgfile, jabberd_struct::cmd_line, jabberd_struct::cmd_line_p, configo(), configurate(), deliver(), deliver__flag, deliver_init(), deliver_pool_debug(), deliver_shutdown(), heartbeat_birth(), heartbeat_death(), log_alert(), log_debug2, log_notice(), LOGT_CONFIG, LOGT_EVENT, LOGT_STATUS, mio_init(), mio_tls_early_init(), NS_JABBERD_CONFIGFILE, pool_free(), pool_new, pool_stat(), pstrdup(), r_DONE, r_UNREG, register_beat(), jabberd_struct::runtime_pool, set_cmdline_debug_flag(), shutdown_callbacks(), jabberd_struct::signalflag, xhash_free(), xhash_new(), xhash_put(), xmlnode_free(), xmlnode_get_data(), xmlnode_get_list_item(), xmlnode_get_tags(), xmlnode_stat(), and ZONE.
| void shutdown_callbacks | ( | void | ) |
call all registered shutdown callbacks
References shutdown_list::arg, shutdown_list::f, shutdown_list::next, shutdown_list::p, and pool_free().
Referenced by main().
| void xmlnode_stat | ( | ) |
Referenced by main().
| xht debug__zones = NULL |
the debugging zones, that are enabled (key = zone string, value = zone string)
| int deliver__flag |
this holds the parsed configuration file
hash of all created XML routing target instances (key is the id of the instance, value is the instance)
Referenced by configo(), and instance_shutdown().
| jabberd_struct jabberd = { NULL, NULL, 0, NULL, NULL } |
global data for the jabberd
1.6.1