ARB
|
#include <unistd.h>
#include <csignal>
#include <cerrno>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include "gb_key.h"
#include "gb_comm.h"
#include "gb_localdata.h"
#include <SigHandler.h>
#include <arb_signal.h>
#include <arb_file.h>
Go to the source code of this file.
Classes | |
struct | gbcms_delete_list |
struct | Socinf |
struct | gb_server_data |
struct | gbcms_create |
Typedefs | |
typedef GBCM_ServerResult(* | TalkingFunction )(int socket, long *hsin, void *sin, GBDATA *gbd) |
Variables | |
static GBCONTAINER * | gbcms_gb_main |
static TalkingFunction | aisc_talking_functions [] |
#define FD_SET_TYPE |
Definition at line 32 of file adcomm.cxx.
Referenced by GBCMS_accept_calls(), gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
#define debug_printf | ( | a, | |
b | |||
) |
Definition at line 34 of file adcomm.cxx.
Referenced by gbcm_read_bin(), and gbcm_write_bin().
#define GBCMS_TRANSACTION_TIMEOUT 60*60 |
Definition at line 36 of file adcomm.cxx.
Referenced by gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
#define MAX_QUEUE_LEN 5 |
Definition at line 37 of file adcomm.cxx.
Referenced by GBCMS_open().
#define GBCM_COMMAND_UNFOLD (GBTUM_MAGIC_NUMBER) |
Definition at line 39 of file adcomm.cxx.
Referenced by gbcm_unfold_client().
#define GBCM_COMMAND_GET_UPDATA (GBTUM_MAGIC_NUMBER+1) |
Definition at line 40 of file adcomm.cxx.
#define GBCM_COMMAND_PUT_UPDATE (GBTUM_MAGIC_NUMBER+2) |
Definition at line 41 of file adcomm.cxx.
Referenced by gbcmc_begin_sendupdate().
#define GBCM_COMMAND_UPDATED (GBTUM_MAGIC_NUMBER+3) |
Definition at line 42 of file adcomm.cxx.
#define GBCM_COMMAND_BEGIN_TRANSACTION (GBTUM_MAGIC_NUMBER+4) |
Definition at line 43 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction().
#define GBCM_COMMAND_COMMIT_TRANSACTION (GBTUM_MAGIC_NUMBER+5) |
Definition at line 44 of file adcomm.cxx.
Referenced by gbcmc_commit_transaction().
#define GBCM_COMMAND_ABORT_TRANSACTION (GBTUM_MAGIC_NUMBER+6) |
Definition at line 45 of file adcomm.cxx.
Referenced by gbcmc_abort_transaction().
#define GBCM_COMMAND_INIT_TRANSACTION (GBTUM_MAGIC_NUMBER+7) |
Definition at line 46 of file adcomm.cxx.
Referenced by gbcmc_init_transaction().
#define GBCM_COMMAND_FIND (GBTUM_MAGIC_NUMBER+8) |
Definition at line 47 of file adcomm.cxx.
Referenced by GBCMC_find().
#define GBCM_COMMAND_CLOSE (GBTUM_MAGIC_NUMBER+9) |
Definition at line 48 of file adcomm.cxx.
Referenced by gbcmc_close().
#define GBCM_COMMAND_KEY_ALLOC (GBTUM_MAGIC_NUMBER+11) |
Definition at line 49 of file adcomm.cxx.
Referenced by gbcmc_key_alloc().
#define GBCM_COMMAND_UNDO (GBTUM_MAGIC_NUMBER+12) |
Definition at line 50 of file adcomm.cxx.
Referenced by gbcmc_send_undo_commands(), and gbcmc_send_undo_info_commands().
#define GBCM_COMMAND_DONT_WAIT (GBTUM_MAGIC_NUMBER+13) |
Definition at line 51 of file adcomm.cxx.
Referenced by GB_tell_server_dont_wait().
#define GBCM_COMMAND_SEND (GBTUM_MAGIC_NUMBER+0x1000) |
Definition at line 53 of file adcomm.cxx.
Referenced by gbcm_read_bin(), and gbcm_write_bin().
#define GBCM_COMMAND_SEND_COUNT (GBTUM_MAGIC_NUMBER+0x2000) |
Definition at line 54 of file adcomm.cxx.
Referenced by gbcm_unfold_client(), and gbcms_talking_unfold().
#define GBCM_COMMAND_SETDEEP (GBTUM_MAGIC_NUMBER+0x3000) |
Definition at line 55 of file adcomm.cxx.
Referenced by gbcm_unfold_client(), and gbcms_talking_unfold().
#define GBCM_COMMAND_SETINDEX (GBTUM_MAGIC_NUMBER+0x4000) |
Definition at line 56 of file adcomm.cxx.
Referenced by gbcm_unfold_client(), and gbcms_talking_unfold().
#define GBCM_COMMAND_PUT_UPDATE_KEYS (GBTUM_MAGIC_NUMBER+0x5000) |
Definition at line 57 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction(), and gbcms_write_keys().
#define GBCM_COMMAND_PUT_UPDATE_CREATE (GBTUM_MAGIC_NUMBER+0x6000) |
Definition at line 58 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction(), gbcmc_sendupdate_create(), gbcms_talking_put_update(), and gbcms_write_updated().
#define GBCM_COMMAND_PUT_UPDATE_DELETE (GBTUM_MAGIC_NUMBER+0x7000) |
Definition at line 59 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction(), gbcmc_sendupdate_delete(), gbcms_talking_put_update(), and gbcms_write_deleted().
#define GBCM_COMMAND_PUT_UPDATE_UPDATE (GBTUM_MAGIC_NUMBER+0x8000) |
Definition at line 60 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction(), gbcmc_sendupdate_update(), gbcms_talking_put_update(), and gbcms_write_updated().
#define GBCM_COMMAND_PUT_UPDATE_END (GBTUM_MAGIC_NUMBER+0x9000) |
Definition at line 61 of file adcomm.cxx.
Referenced by gbcmc_begin_transaction(), gbcmc_end_sendupdate(), gbcms_talking_begin_transaction(), and gbcms_talking_put_update().
#define GBCM_COMMAND_TRANSACTION_RETURN (GBTUM_MAGIC_NUMBER+0x100000) |
Definition at line 62 of file adcomm.cxx.
Referenced by commit_or_abort_transaction(), gbcmc_abort_transaction(), gbcmc_begin_transaction(), gbcmc_commit_transaction(), gbcmc_init_transaction(), gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
#define GBCM_COMMAND_FIND_ERG (GBTUM_MAGIC_NUMBER+0x108000) |
Definition at line 63 of file adcomm.cxx.
Referenced by GBCMC_find(), and gbcms_talking_find().
#define GBCM_COMMAND_KEY_ALLOC_RES (GBTUM_MAGIC_NUMBER+0x10b000) |
Definition at line 64 of file adcomm.cxx.
Referenced by gbcmc_key_alloc(), and gbcms_talking_key_alloc().
#define GBCM_COMMAND_UNDO_CMD (GBTUM_MAGIC_NUMBER+0x10a0001) |
Definition at line 65 of file adcomm.cxx.
Referenced by gbcmc_send_undo_commands(), gbcmc_send_undo_info_commands(), and gbcms_talking_undo().
#define CLIENT_ERROR | ( | reason | ) | clientserver_error("client", reason, __LINE__) |
Definition at line 75 of file adcomm.cxx.
Referenced by gbcm_unfold_client(), gbcmc_read_keys(), gbcmc_sendupdate_create(), and gbcmc_sendupdate_update().
#define SERVER_ERROR | ( | reason | ) | clientserver_error("server", reason, __LINE__) |
Definition at line 76 of file adcomm.cxx.
#define COMM_ERROR | ( | reason | ) | clientserver_error("communication", reason, __LINE__) |
Definition at line 77 of file adcomm.cxx.
#define CLIENT_RECEIVE_ERROR | ( | ) | CLIENT_ERROR("receive failed") |
Definition at line 79 of file adcomm.cxx.
Referenced by gbcmc_abort_transaction(), gbcmc_begin_transaction(), gbcmc_commit_transaction(), gbcmc_end_sendupdate(), GBCMC_find(), gbcmc_init_transaction(), gbcmc_key_alloc(), gbcmc_read_keys(), and gbcmc_unfold_list().
#define SERVER_RECEIVE_ERROR | ( | ) | SERVER_ERROR("receive failed") |
Definition at line 80 of file adcomm.cxx.
#define COMM_RECEIVE_ERROR | ( | ) | COMM_ERROR("receive failed") |
Definition at line 81 of file adcomm.cxx.
#define CLIENT_SEND_ERROR | ( | ) | CLIENT_ERROR("send failed") |
Definition at line 83 of file adcomm.cxx.
Referenced by GB_tell_server_dont_wait(), gbcm_unfold_client(), gbcmc_abort_transaction(), gbcmc_begin_transaction(), gbcmc_close(), gbcmc_commit_transaction(), GBCMC_find(), gbcmc_init_transaction(), gbcmc_key_alloc(), gbcmc_send_undo_commands(), and gbcmc_send_undo_info_commands().
#define SERVER_SEND_ERROR | ( | ) | SERVER_ERROR("send failed") |
Definition at line 84 of file adcomm.cxx.
#define COMM_SEND_ERROR | ( | ) | COMM_ERROR("send failed") |
Definition at line 85 of file adcomm.cxx.
Referenced by gbcm_write_bin().
#define CLIENT_SEND_ERROR_AT_ITEM | ( | gb_item | ) | CLIENT_ERROR(GBS_global_string("send failed (entry='%s')", GB_KEY(gb_item))) |
Definition at line 87 of file adcomm.cxx.
Referenced by gbcmc_abort_transaction(), gbcmc_begin_sendupdate(), gbcmc_begin_transaction(), gbcmc_commit_transaction(), gbcmc_end_sendupdate(), gbcmc_init_transaction(), gbcmc_sendupdate_create(), gbcmc_sendupdate_delete(), and gbcmc_sendupdate_update().
#define RETURN_SERVER_FAULT_ON_BAD_ADDRESS | ( | ptr | ) |
Definition at line 361 of file adcomm.cxx.
Referenced by commit_or_abort_transaction(), gbcm_read_bin(), gbcms_talking_find(), gbcms_talking_key_alloc(), gbcms_talking_put_update(), and gbcms_talking_unfold().
typedef GBCM_ServerResult(* TalkingFunction)(int socket, long *hsin, void *sin, GBDATA *gbd) |
Definition at line 1142 of file adcomm.cxx.
|
static |
Definition at line 1161 of file adcomm.cxx.
References aisc_talking_functions, error(), gbcm_read(), gbcm_read_flush(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, GBCM_SERVER_OK_WAIT, GBTUM_MAGIC_NUMBER, and GBTUM_MAGIC_NUMBER_FILTER.
Referenced by GBCMS_accept_calls(), gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
|
inline |
Definition at line 70 of file adcomm.cxx.
References GB_get_arb_revision_tag(), and GBS_global_string().
|
static |
Definition at line 89 of file adcomm.cxx.
References fflush(), fputc(), and fputs().
Referenced by gbcms_talking_unfold(), and gbcms_write_updated().
|
static |
Definition at line 113 of file adcomm.cxx.
References Socinf::next, NULp, and Socinf::username.
Referenced by GBCMS_accept_calls().
|
static |
Definition at line 147 of file adcomm.cxx.
References error(), GB_await_error(), GB_fopen_tempfile(), GB_getenv(), GB_getenvUSER(), GB_read_fp(), GBCONTAINER_MAIN(), GBS_global_string(), NULp, and GB_MAIN_TYPE::panic_save().
Referenced by GBCMS_open().
Definition at line 198 of file adcomm.cxx.
References GBDATA::as_container(), ASSERT_RESULT, error(), gb_main, gb_server_data::gb_main, GB_MAIN(), gbcm_open_socket(), gbcmc_close(), gbcmc_open(), gbcms_sighup(), GBS_global_string(), gb_server_data::hso, INSTALL_SIGHANDLER, MAX_QUEUE_LEN, NULp, GB_MAIN_TYPE::server_data, gb_server_data::timeout, and gb_server_data::unix_name.
Referenced by run_server(), and startup_dbserver().
void GBCMS_shutdown | ( | GBDATA * | gbd | ) |
Definition at line 247 of file adcomm.cxx.
References GB_MAIN(), gb_server_data::hso, Socinf::next, GB_MAIN_TYPE::server_data, gb_server_data::soci, Socinf::socket, and gb_server_data::unix_name.
Referenced by nt_disconnect_from_db(), and run_server().
Definition at line 271 of file adcomm.cxx.
References STATIC_ASSERT, and T.
Referenced by gbcm_write_bin().
|
static |
Definition at line 278 of file adcomm.cxx.
References GBDATA::as_container(), GBDATA::as_entry(), COMM_SEND_ERROR, GBCONTAINER::d, GBENTRY::data(), debug_printf, error(), gb_header_list::flags, GBDATA::flags, GBCONTAINER::flags3, GB_BITS, GB_DATA_LIST_HEADER(), GB_give_buffer2(), GBCM_COMMAND_SEND, gbcm_write(), GBCONTAINER_ELEM(), gb_data_base_type_union::i, GBDATA::index, GBENTRY::info, GBDATA::is_container(), long, GBENTRY::memsize(), gb_data_list::nheader, NULp, gb_data_list::size, GBENTRY::size(), GBDATA::type(), and write_into_comm_buffer().
Referenced by gbcmc_sendupdate_create(), gbcmc_sendupdate_update(), gbcms_talking_unfold(), and gbcms_write_updated().
|
static |
Definition at line 370 of file adcomm.cxx.
References GBDATA::as_container(), GBDATA::as_entry(), assert_or_exit, buffer, gbcms_create::client_id, GB_MAIN_TYPE::clock, GBCONTAINER::d, debug_printf, gb_data_base_type_union::ex, gb_header_flags::flags, gb_header_list::flags, flags, GBDATA::flags, GBDATA::flags2, GBCONTAINER::flags3, gb_flag_types2::folded_container, GB_BITS, gb_create_header_array(), GB_CREATED, GB_DATA_LIST_HEADER(), GB_DB, GB_DELETED, GB_give_buffer2(), GB_internal_error(), GB_MAIN(), gb_make_container(), gb_make_entry(), GB_NORMAL_CHANGE, gb_save_extern_data_in_ts(), gb_touch_entry(), gb_touch_header(), gb_write_index_key(), GBCM_COMMAND_SEND, gbcm_read(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, GBCONTAINER_ELEM(), GBCONTAINER_MAIN(), GBS_write_numhash(), gb_extern_data::get_data(), GBCONTAINER::header_update_date, gb_data_base_type_union::i, id, GBENTRY::index_check_out(), GBENTRY::info, gb_header_flags::key_quark, long, gbcms_create::next, gb_data_list::nheader, NULp, RETURN_SERVER_FAULT_ON_BAD_ADDRESS, GBDATA::server_id, gbcms_create::server_id, gb_header_flags::set_change(), GBENTRY::stored_external(), gb_flag_types::type, type, and GBDATA::type().
Referenced by gbcm_unfold_client(), gbcmc_begin_transaction(), and gbcms_talking_put_update().
|
static |
Definition at line 579 of file adcomm.cxx.
References gb_server_data::del_first, Socinf::dl, and gbcms_delete_list::next.
Referenced by gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
|
static |
Definition at line 590 of file adcomm.cxx.
References buffer, gbcms_delete_list::creation_date, gb_server_data::del_first, Socinf::dl, GBCM_COMMAND_PUT_UPDATE_DELETE, GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write(), gbcms_delete_list::gbd, GBM_CB_INDEX, gbm_free_mem(), if, long, Socinf::next, gbcms_delete_list::next, gb_server_data::soci, and Socinf::socket.
Referenced by gbcms_talking_begin_transaction().
|
static |
Definition at line 623 of file adcomm.cxx.
References GBDATA::as_container(), buffer, GBDATA::creation_date(), GBCONTAINER::d, dumpError(), error(), GB_FATHER(), GBCM_COMMAND_PUT_UPDATE_CREATE, GBCM_COMMAND_PUT_UPDATE_UPDATE, GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write(), gbcm_write_bin(), GBCONTAINER_ELEM(), GBCONTAINER::header_update_date, GBDATA::is_container(), long, gb_data_list::nheader, and GBDATA::update_date().
Referenced by gbcms_talking_begin_transaction().
|
static |
Definition at line 676 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::first_free_key, GB_MAIN(), GBCM_COMMAND_PUT_UPDATE_KEYS, GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write(), gbcm_write_string(), gb_Key::key, GB_MAIN_TYPE::keycnt, GB_MAIN_TYPE::keys, long, gb_Key::next_free_key, and gb_Key::nref.
Referenced by gbcms_talking_begin_transaction(), and gbcms_talking_init_transaction().
|
static |
Definition at line 697 of file adcomm.cxx.
References buffer, GBCONTAINER::d, dumpError(), error(), GBDATA::expect_container(), GB_DB, GB_give_buffer(), GBCM_COMMAND_SEND_COUNT, GBCM_COMMAND_SETDEEP, GBCM_COMMAND_SETINDEX, gbcm_read_flush(), gbcm_read_two(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write_bin(), gbcm_write_flush(), gbcm_write_two(), GBCONTAINER_ELEM(), gb_data_list::nheader, NULp, RETURN_SERVER_FAULT_ON_BAD_ADDRESS, gb_data_list::size, start, and GBDATA::type().
|
static |
Definition at line 757 of file adcomm.cxx.
References GBCM_SERVER_OK.
|
static |
Definition at line 761 of file adcomm.cxx.
References GBDATA::as_container(), buffer, gb_delete_force(), GB_give_buffer(), GBCM_COMMAND_PUT_UPDATE_CREATE, GBCM_COMMAND_PUT_UPDATE_DELETE, GBCM_COMMAND_PUT_UPDATE_END, GBCM_COMMAND_PUT_UPDATE_UPDATE, gbcm_read(), gbcm_read_bin(), gbcm_read_flush(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write(), gbcm_write_flush(), long, gbcms_create::next, NULp, and RETURN_SERVER_FAULT_ON_BAD_ADDRESS.
|
static |
Definition at line 817 of file adcomm.cxx.
References GBCM_SERVER_OK.
|
static |
Definition at line 821 of file adcomm.cxx.
References ARB_ABORT, ARB_COMMIT, ARB_TRANS, GBDATA::as_container(), GB_MAIN_TYPE::clock, FD_SET_TYPE, GB_abort_transaction(), GB_begin_transaction(), GB_commit_transaction(), GB_export_errorf(), gb_local, gb_main, gb_server_data::gb_main, GB_MAIN(), GB_print_error(), GBCM_COMMAND_TRANSACTION_RETURN, gbcm_login(), gbcm_read_flush(), gbcm_read_string(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write_flush(), gbcm_write_two(), gbcms_shift_delete_list(), gbcms_talking(), GBCMS_TRANSACTION_TIMEOUT, gbcms_write_keys(), NULp, gb_local_data::running_client_transaction, GB_MAIN_TYPE::this_user, gb_user::userid, and Socinf::username.
|
static |
Definition at line 893 of file adcomm.cxx.
References ARB_ABORT, ARB_COMMIT, ARB_TRANS, buffer, FD_SET_TYPE, GB_abort_transaction(), GB_begin_transaction(), GB_commit_transaction(), GB_export_errorf(), GB_give_buffer(), gb_local, gb_main, gb_server_data::gb_main, GB_MAIN(), GB_print_error(), GBCM_COMMAND_PUT_UPDATE_END, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read_flush(), GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write(), gbcm_write_flush(), gbcm_write_two(), gbcms_shift_delete_list(), gbcms_talking(), GBCMS_TRANSACTION_TIMEOUT, gbcms_write_deleted(), gbcms_write_keys(), gbcms_write_updated(), GB_MAIN_TYPE::key_clock, long, NULp, and gb_local_data::running_client_transaction.
|
static |
Definition at line 964 of file adcomm.cxx.
References gb_local, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read_flush(), GBCM_SERVER_FAULT, gbcm_write_flush(), gbcm_write_two(), RETURN_SERVER_FAULT_ON_BAD_ADDRESS, and gb_local_data::running_client_transaction.
Referenced by gbcms_talking_abort_transaction(), and gbcms_talking_commit_transaction().
|
static |
Definition at line 973 of file adcomm.cxx.
References ARB_COMMIT, and commit_or_abort_transaction().
|
static |
Definition at line 978 of file adcomm.cxx.
References ARB_ABORT, and commit_or_abort_transaction().
|
static |
Definition at line 983 of file adcomm.cxx.
References GBCM_SERVER_ABORTED.
|
static |
Definition at line 988 of file adcomm.cxx.
References _GBCMC_UNDOCOM_INFO_REDO, _GBCMC_UNDOCOM_INFO_UNDO, _GBCMC_UNDOCOM_REDO, _GBCMC_UNDOCOM_REQUEST_NOUNDO, _GBCMC_UNDOCOM_REQUEST_NOUNDO_KILL, _GBCMC_UNDOCOM_REQUEST_UNDO, _GBCMC_UNDOCOM_UNDO, GB_request_undo_type(), GB_set_undo_mem(), GB_undo(), GB_undo_info(), GB_UNDO_KILL, GB_UNDO_NONE, GB_UNDO_REDO, GB_UNDO_UNDO, GBCM_COMMAND_UNDO_CMD, gbcm_read_flush(), gbcm_read_two(), GBCM_SERVER_FAULT, gbcm_write_flush(), gbcm_write_string(), NULp, and result.
|
static |
Definition at line 1029 of file adcomm.cxx.
References buffer, gb_assert, GB_CASE_UNDEFINED, GB_export_errorf(), GB_FATHER(), GB_FIND, GB_find(), GB_find_int(), GB_find_string(), GB_GRANDPA(), GB_INT, GB_internal_errorf(), GB_NONE, GB_print_error(), GB_STRING, GBCM_COMMAND_FIND_ERG, gbcm_read_flush(), gbcm_read_long(), gbcm_read_string(), GBCM_SERVER_FAULT, gbcm_write(), gbcm_write_flush(), gbcm_write_two(), NULp, RETURN_SERVER_FAULT_ON_BAD_ADDRESS, and type.
|
static |
Definition at line 1103 of file adcomm.cxx.
References gb_create_key(), GB_MAIN(), GBCM_COMMAND_KEY_ALLOC_RES, gbcm_read_flush(), gbcm_read_string(), GBCM_SERVER_FAULT, gbcm_write_flush(), gbcm_write_two(), and RETURN_SERVER_FAULT_ON_BAD_ADDRESS.
|
static |
Definition at line 1128 of file adcomm.cxx.
References GBCM_SERVER_OK_WAIT, and gb_server_data::wait_for_new_request.
|
static |
Definition at line 1134 of file adcomm.cxx.
References fputs(), and GBCM_SERVER_FAULT.
bool GBCMS_accept_calls | ( | GBDATA * | gbd, |
bool | wait_extra_time | ||
) |
Definition at line 1188 of file adcomm.cxx.
References error(), FD_SET_TYPE, g_bcms_delete_Socinf(), GB_MAIN(), gbcm_logout(), GBCM_SERVER_ABORTED, GBCM_SERVER_OK, gbcms_talking(), GB_MAIN_TYPE::get_transaction_level(), gb_server_data::hso, Socinf::next, gb_server_data::nsoc, NULp, GB_MAIN_TYPE::server_data, gb_server_data::soci, Socinf::socket, gb_server_data::timeout, and gb_server_data::wait_for_new_request.
Referenced by serve_db_interrupt(), and served().
GB_ERROR gbcm_unfold_client | ( | GBCONTAINER * | gbc, |
long | deep, | ||
long | index_pos | ||
) |
Definition at line 1305 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::c_link, CLIENT_ERROR, CLIENT_SEND_ERROR, error(), GBDATA::flags2, gb_flag_types2::folded_container, GB_read_key_pntr(), GBCM_COMMAND_SEND_COUNT, GBCM_COMMAND_SETDEEP, GBCM_COMMAND_SETINDEX, GBCM_COMMAND_UNFOLD, gbcm_read_bin(), gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_two(), GBCONTAINER_MAIN(), GBS_global_string(), NULp, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by gb_unfold().
Definition at line 1356 of file adcomm.cxx.
References CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN(), GBCM_COMMAND_PUT_UPDATE, gbcm_write_two(), NULp, and GBDATA::server_id.
Referenced by GB_MAIN_TYPE::commit_transaction(), and GB_MAIN_TYPE::send_update_to_server().
Definition at line 1365 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN(), GBCM_COMMAND_PUT_UPDATE_END, gbcm_read(), gbcm_read_flush(), gbcm_write_flush(), gbcm_write_two(), GBS_write_numhash(), NULp, GB_MAIN_TYPE::remote_hash, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by GB_MAIN_TYPE::commit_transaction(), and GB_MAIN_TYPE::send_update_to_server().
Definition at line 1389 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::c_link, CLIENT_ERROR, CLIENT_SEND_ERROR_AT_ITEM, father, GB_FATHER(), GB_give_buffer(), GB_KEY(), GB_MAIN(), GBCM_COMMAND_PUT_UPDATE_CREATE, gbcm_write_bin(), gbcm_write_two(), GBS_global_string(), GBDATA::server_id, and gbcmc_comm::socket.
Referenced by gb_commit_transaction_local_rek().
Definition at line 1406 of file adcomm.cxx.
References CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN(), GBCM_COMMAND_PUT_UPDATE_DELETE, gbcm_write_two(), NULp, and GBDATA::server_id.
Referenced by gb_commit_transaction_local_rek().
Definition at line 1415 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::c_link, CLIENT_ERROR, CLIENT_SEND_ERROR_AT_ITEM, father, GB_FATHER(), GB_give_buffer(), GB_KEY(), GB_MAIN(), GBCM_COMMAND_PUT_UPDATE_UPDATE, gbcm_write_bin(), gbcm_write_two(), GBS_global_string(), GBDATA::server_id, and gbcmc_comm::socket.
Referenced by gb_commit_transaction_local_rek().
|
static |
Definition at line 1432 of file adcomm.cxx.
References buffer, CLIENT_ERROR, CLIENT_RECEIVE_ERROR, GB_MAIN_TYPE::first_free_key, gb_create_key_array(), GB_MAIN(), gbcm_read(), gbcm_read_string(), GBS_write_hash(), gb_Key::key, GB_MAIN_TYPE::key_2_index_hash, GB_MAIN_TYPE::keycnt, GB_MAIN_TYPE::keys, gb_Key::next_free_key, gb_Key::nref, and NULp.
Referenced by gbcmc_begin_transaction(), and gbcmc_init_transaction().
Definition at line 1469 of file adcomm.cxx.
References GBDATA::as_container(), buffer, GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN_TYPE::clock, GBDATA::create_extended(), error(), GBDATA::flags2, gb_flag_types2::folded_container, gb_delete_entry(), GB_give_buffer(), GB_MAIN(), GBCM_COMMAND_BEGIN_TRANSACTION, GBCM_COMMAND_PUT_UPDATE_CREATE, GBCM_COMMAND_PUT_UPDATE_DELETE, GBCM_COMMAND_PUT_UPDATE_END, GBCM_COMMAND_PUT_UPDATE_KEYS, GBCM_COMMAND_PUT_UPDATE_UPDATE, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read(), gbcm_read_bin(), gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_two(), gbcmc_read_keys(), GBS_read_numhash(), NULp, GB_MAIN_TYPE::remote_hash, gbcmc_comm::socket, GBDATA::touch_creation_and_update(), and GBDATA::touch_update().
GB_ERROR gbcmc_init_transaction | ( | GBCONTAINER * | gbc | ) |
Definition at line 1549 of file adcomm.cxx.
References buffer, GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN_TYPE::clock, error(), GBCM_COMMAND_INIT_TRANSACTION, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read(), gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_string(), gbcm_write_two(), gbcmc_read_keys(), GBCONTAINER_MAIN(), GBS_write_numhash(), NULp, GB_MAIN_TYPE::remote_hash, GBDATA::server_id, gbcmc_comm::socket, GB_MAIN_TYPE::this_user, gb_user::userbit, gb_user::userid, and gb_user::username.
Definition at line 1596 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN(), GBCM_COMMAND_COMMIT_TRANSACTION, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_two(), NULp, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by GB_MAIN_TYPE::commit_transaction().
Definition at line 1615 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, CLIENT_SEND_ERROR_AT_ITEM, GB_MAIN(), GBCM_COMMAND_ABORT_TRANSACTION, GBCM_COMMAND_TRANSACTION_RETURN, gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_two(), NULp, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by GB_MAIN_TYPE::abort_transaction().
Definition at line 1635 of file adcomm.cxx.
References gbcms_delete_list::creation_date, GBDATA::creation_date(), gb_server_data::del_first, gb_server_data::del_last, GB_MAIN(), gbcms_delete_list::gbd, GBM_CB_INDEX, gbm_get_mem(), gbcms_delete_list::next, NULp, GB_MAIN_TYPE::server_data, gb_server_data::soci, gbcms_delete_list::update_date, and GBDATA::update_date().
Referenced by gb_commit_transaction_local_rek().
void GB_set_remote_action | ( | GBDATA * | gbd, |
bool | in_action | ||
) |
Definition at line 1656 of file adcomm.cxx.
References gb_assert, GB_MAIN(), gb_server_data::inside_remote_action, GB_MAIN_TYPE::is_server(), and GB_MAIN_TYPE::server_data.
Referenced by check_for_remote_command().
bool GB_inside_remote_action | ( | GBDATA * | gbd | ) |
Definition at line 1668 of file adcomm.cxx.
References gb_assert, GB_MAIN(), gb_server_data::inside_remote_action, GB_MAIN_TYPE::is_server(), and GB_MAIN_TYPE::server_data.
Referenced by GB_resort_data_base().
Definition at line 1682 of file adcomm.cxx.
References GB_MAIN(), GB_MAIN_TYPE::is_server(), gb_server_data::nsoc, and GB_MAIN_TYPE::server_data.
Referenced by gb_create_header_array(), GB_create_index(), GB_resort_data_base(), gb_resort_system_folder_to_top(), MERGE_create_main_window(), nt_create_all_awars(), nt_disconnect_from_db(), NT_exit(), NT_restart(), server_main_loop(), and startup_dbserver().
bool GB_is_server | ( | GBDATA * | gbd | ) |
Definition at line 1697 of file adcomm.cxx.
References GB_MAIN(), and GB_MAIN_TYPE::is_server().
Referenced by check_for_remote_command(), dump_internal(), make_macro_recording_tracker(), MERGE_create_main_window(), and startup_mainwindow_and_dbserver().
|
static |
Definition at line 1701 of file adcomm.cxx.
References CLIENT_RECEIVE_ERROR, error(), GB_MAIN(), gb_unfold(), gbcm_read(), GBS_read_numhash(), long, NULp, and GB_MAIN_TYPE::remote_hash.
Referenced by GBCMC_find().
|
static |
Definition at line 1721 of file adcomm.cxx.
References GB_internal_errorf().
Referenced by GBCMC_find(), gbcmc_key_alloc(), gbcmc_send_undo_commands(), and gbcmc_send_undo_info_commands().
GBDATA* GBCMC_find | ( | GBDATA * | gbd, |
const char * | key, | ||
GB_TYPES | type, | ||
const char * | str, | ||
GB_CASE | case_sens, | ||
GB_SEARCH_TYPE | gbs | ||
) |
Definition at line 1725 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, error(), gb_assert, GB_export_error(), GB_export_errorf(), GB_INT, GB_MAIN(), GB_NONE, GB_STRING, GBCM_COMMAND_FIND, GBCM_COMMAND_FIND_ERG, gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_long(), gbcm_write_string(), gbcm_write_two(), gbcmc_unfold_list(), GBS_read_numhash(), invalid_use_in_server(), GB_MAIN_TYPE::is_server(), NULp, GB_MAIN_TYPE::remote_hash, result, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by find_sub_sub_by_quark().
allocate a new key quark from client returns new key quark for 'key' or 0 (error is exported in that case)
Definition at line 1788 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_RECEIVE_ERROR, CLIENT_SEND_ERROR, error(), gb_assert, GB_export_error(), GB_MAIN(), GBCM_COMMAND_KEY_ALLOC, GBCM_COMMAND_KEY_ALLOC_RES, gbcm_read_flush(), gbcm_read_two(), gbcm_write_flush(), gbcm_write_string(), gbcm_write_two(), invalid_use_in_server(), GB_MAIN_TYPE::is_server(), NULp, result, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by gb_create_key().
GB_ERROR gbcmc_send_undo_commands | ( | GBDATA * | gbd, |
enum gb_undo_commands | command | ||
) |
Definition at line 1824 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_SEND_ERROR, error(), GB_MAIN(), GBCM_COMMAND_UNDO, GBCM_COMMAND_UNDO_CMD, gbcm_read_flush(), gbcm_read_string(), gbcm_write_flush(), gbcm_write_two(), invalid_use_in_server(), GB_MAIN_TYPE::is_server(), NULp, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by GB_request_undo_type(), GB_set_undo_mem(), and GB_undo().
char* gbcmc_send_undo_info_commands | ( | GBDATA * | gbd, |
enum gb_undo_commands | command | ||
) |
Definition at line 1847 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_SEND_ERROR, GB_export_error(), GB_MAIN(), GBCM_COMMAND_UNDO, GBCM_COMMAND_UNDO_CMD, gbcm_read_flush(), gbcm_read_string(), gbcm_write_flush(), gbcm_write_two(), invalid_use_in_server(), GB_MAIN_TYPE::is_server(), NULp, result, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by GB_undo_info().
Definition at line 1867 of file adcomm.cxx.
References GB_MAIN_TYPE::c_link, CLIENT_SEND_ERROR, GB_MAIN(), GBCM_COMMAND_DONT_WAIT, gbcm_write_two(), GB_MAIN_TYPE::is_server(), NULp, GBDATA::server_id, and gbcmc_comm::socket.
Referenced by DI_timer(), and ED4_timer().
GB_ERROR gbcm_login | ( | GBCONTAINER * | gb_main, |
const char * | loginname | ||
) |
Definition at line 1883 of file adcomm.cxx.
References ARB_calloc(), ARB_strdup(), GB_MAX_USERS, GBCONTAINER_MAIN(), GBS_global_string(), NULp, gb_user::nusers, GB_MAIN_TYPE::this_user, gb_user::userbit, gb_user::userid, gb_user::username, and GB_MAIN_TYPE::users.
Referenced by GB_login(), and gbcms_talking_init_transaction().
GBCM_ServerResult gbcmc_close | ( | gbcmc_comm * | link | ) |
Definition at line 1916 of file adcomm.cxx.
References CLIENT_SEND_ERROR, GB_export_error(), GBCM_COMMAND_CLOSE, GBCM_SERVER_FAULT, GBCM_SERVER_OK, gbcm_write_flush(), gbcm_write_two(), gbcmc_comm::socket, and gbcmc_comm::unix_name.
Referenced by GB_close(), and GBCMS_open().
GB_ERROR gbcm_logout | ( | GB_MAIN_TYPE * | Main, |
const char * | loginname | ||
) |
Definition at line 1934 of file adcomm.cxx.
References gb_assert, GB_export_errorf(), GB_MAX_USERS, NULp, gb_user::nusers, gb_user::username, and GB_MAIN_TYPE::users.
Referenced by GB_close(), GB_login(), and GBCMS_accept_calls().
Definition at line 1957 of file adcomm.cxx.
References error(), gb_assert, GB_await_error(), GB_fopen_tempfile(), GB_getenv(), GB_getenvUSER(), GB_is_privatefile(), GBS_global_string(), GBS_global_string_copy(), and NULp.
Referenced by ARB_main(), aw_initstatus(), and GB_login().
|
static |
Definition at line 145 of file adcomm.cxx.
|
static |
Definition at line 1144 of file adcomm.cxx.
Referenced by gbcms_talking().