ARB
Macros | Functions | Variables
db_server.cxx File Reference
#include <arbdb.h>
#include <ad_cb.h>
#include <servercntrl.h>
#include <ut_valgrinded.h>
#include <arb_file.h>
#include <arb_sleep.h>
#include <arb_diff.h>
Include dependency graph for db_server.cxx:

Go to the source code of this file.

Macros

#define TIMEOUT   1000*60*2
 
#define LOOPS   30
 

Functions

GBDATAdbserver_container (GBDATA *gb_main)
 
GBDATAdbserver_entry (GBDATA *gb_main, const char *entry)
 
GBDATAget_command_entry (GBDATA *gb_main)
 
GBDATAget_param_entry (GBDATA *gb_main)
 
GBDATAget_result_entry (GBDATA *gb_main)
 
GB_ERROR init_data (GBDATA *gb_main)
 
bool served (GBDATA *gb_main)
 
static void command_cb ()
 
static void react_to_command (GBDATA *gb_main)
 
static GB_ERROR server_main_loop (GBDATA *gb_main)
 
static GB_ERROR check_socket_available (const arb_params &params)
 
static GB_ERROR run_server (const arb_params &params)
 
static GB_ERROR run_command (const arb_params &params, const char *command)
 
static void show_help ()
 
int ARB_main (int argc, char *argv[])
 

Variables

static bool do_shutdown = false
 
static bool command_triggered = false
 
static const charsavemode = "b"
 

Macro Definition Documentation

#define TIMEOUT   1000*60*2

Definition at line 19 of file db_server.cxx.

Referenced by run_server().

#define LOOPS   30

Definition at line 20 of file db_server.cxx.

Function Documentation

GBDATA* dbserver_container ( GBDATA gb_main)
inline

Definition at line 22 of file db_server.cxx.

References GB_CREATE_CONTAINER, and GB_search().

Referenced by dbserver_entry().

GBDATA* dbserver_entry ( GBDATA gb_main,
const char entry 
)
inline
GBDATA* get_command_entry ( GBDATA gb_main)
inline

Definition at line 36 of file db_server.cxx.

References dbserver_entry().

Referenced by init_data(), react_to_command(), run_command(), and server_main_loop().

GBDATA* get_param_entry ( GBDATA gb_main)
inline

Definition at line 37 of file db_server.cxx.

References dbserver_entry().

Referenced by init_data(), react_to_command(), and run_command().

GBDATA* get_result_entry ( GBDATA gb_main)
inline

Definition at line 38 of file db_server.cxx.

References dbserver_entry().

Referenced by init_data(), react_to_command(), and run_command().

GB_ERROR init_data ( GBDATA gb_main)
inline

Definition at line 40 of file db_server.cxx.

References error(), GB_await_error(), get_command_entry(), get_param_entry(), get_result_entry(), and NULp.

Referenced by run_server().

bool served ( GBDATA gb_main)
inline

Definition at line 50 of file db_server.cxx.

References GB_begin_transaction(), GB_commit_transaction(), and GBCMS_accept_calls().

Referenced by server_main_loop().

static void command_cb ( )
static

Definition at line 61 of file db_server.cxx.

References command_triggered.

Referenced by server_main_loop().

static void react_to_command ( GBDATA gb_main)
static
static GB_ERROR server_main_loop ( GBDATA gb_main)
static
static GB_ERROR check_socket_available ( const arb_params params)
static

Definition at line 163 of file db_server.cxx.

References GB_clear_error(), GB_close(), GB_open(), GBS_global_string(), NULp, and arb_params::tcp.

Referenced by run_server().

static GB_ERROR run_server ( const arb_params params)
static
static GB_ERROR run_command ( const arb_params params,
const char command 
)
static
static void show_help ( )
static

Definition at line 242 of file db_server.cxx.

References arb_print_server_params(), and fputs().

Referenced by ARB_main(), and CLI::show_help_if_useful().

int ARB_main ( int  argc,
char argv[] 
)

Variable Documentation

bool do_shutdown = false
static

Definition at line 56 of file db_server.cxx.

Referenced by react_to_command(), and server_main_loop().

bool command_triggered = false
static

Definition at line 57 of file db_server.cxx.

Referenced by command_cb(), react_to_command(), and server_main_loop().

const char* savemode = "b"
static

Definition at line 59 of file db_server.cxx.