jabberd.cc File Reference

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 }


Detailed Description

Where all begins ... this file contains the main function, shutdown routines and signal handlers.


Function Documentation

void base_init ( pool  p  ) 

load all base modules

Parameters:
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

Parameters:
exec 0 for the first validation pass, 1 for real startup
Returns:
0 on success, 1 on error

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 
)

void deliver_init ( pool  p  ) 

initialize the XML delivery system

Parameters:
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 
)

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().


Variable Documentation

xht debug__zones = NULL

the debugging zones, that are enabled (key = zone string, value = zone string)

0 = pause delivery on startup and queue for later delivery, 1 = normal operation, -1 = shutdown: no delivery, no queueing

Referenced by deliver(), and main().

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


Generated on Wed Sep 10 01:59:47 2008 for jabberd14 by  doxygen 1.5.5