#include "../../str.h"#include "../../db/db.h"


Go to the source code of this file.
| #define CALL_ID_COL "callid" |
Definition at line 34 of file dlg_db_handler.h.
| #define DB_DEFAULT_UPDATE_PERIOD 60 |
Definition at line 59 of file dlg_db_handler.h.
| #define DB_MODE_DELAYED 2 |
Definition at line 62 of file dlg_db_handler.h.
Referenced by child_init(), init_dlg_db(), mod_destroy(), and mod_init().
| #define DB_MODE_NONE 0 |
Definition at line 60 of file dlg_db_handler.h.
Referenced by child_init(), mod_destroy(), and mod_init().
| #define DB_MODE_REALTIME 1 |
Definition at line 61 of file dlg_db_handler.h.
Referenced by child_init(), dlg_onreply(), dlg_onroute(), and mod_init().
| #define DB_MODE_SHUTDOWN 3 |
Definition at line 63 of file dlg_db_handler.h.
Referenced by child_init(), mod_destroy(), and mod_init().
| #define DIALOG_TABLE_COL_NO 20 |
Definition at line 65 of file dlg_db_handler.h.
Referenced by dialog_update_db(), select_entire_dialog_table(), and update_dialog_dbinfo().
| #define DIALOG_TABLE_NAME "dialog" |
Definition at line 54 of file dlg_db_handler.h.
| #define DLG_TABLE_VERSION 3 |
| #define FROM_CONTACT_COL "caller_contact" |
Definition at line 49 of file dlg_db_handler.h.
| #define FROM_CSEQ_COL "caller_cseq" |
Definition at line 45 of file dlg_db_handler.h.
| #define FROM_ROUTE_COL "caller_route_set" |
Definition at line 47 of file dlg_db_handler.h.
| #define FROM_SOCK_COL "caller_sock" |
Definition at line 50 of file dlg_db_handler.h.
| #define FROM_TAG_COL "from_tag" |
Definition at line 36 of file dlg_db_handler.h.
| #define FROM_URI_COL "from_uri" |
Definition at line 35 of file dlg_db_handler.h.
| #define HASH_ENTRY_COL "hash_entry" |
Definition at line 40 of file dlg_db_handler.h.
| #define HASH_ID_COL "hash_id" |
Definition at line 39 of file dlg_db_handler.h.
| #define SFLAGS_COL "sflags" |
Definition at line 52 of file dlg_db_handler.h.
| #define START_TIME_COL "start_time" |
Definition at line 42 of file dlg_db_handler.h.
| #define STATE_COL "state" |
Definition at line 41 of file dlg_db_handler.h.
| #define TIMEOUT_COL "timeout" |
Definition at line 43 of file dlg_db_handler.h.
| #define TO_CONTACT_COL "callee_contact" |
Definition at line 48 of file dlg_db_handler.h.
| #define TO_CSEQ_COL "callee_cseq" |
Definition at line 44 of file dlg_db_handler.h.
| #define TO_ROUTE_COL "callee_route_set" |
Definition at line 46 of file dlg_db_handler.h.
| #define TO_SOCK_COL "callee_sock" |
Definition at line 51 of file dlg_db_handler.h.
| #define TO_TAG_COL "to_tag" |
Definition at line 38 of file dlg_db_handler.h.
| #define TO_URI_COL "to_uri" |
Definition at line 37 of file dlg_db_handler.h.
| #define TOROUTE_COL "toroute" |
Definition at line 53 of file dlg_db_handler.h.
| void destroy_dlg_db | ( | void | ) |
Definition at line 162 of file dlg_db_handler.c.
References db_func::close.
Referenced by mod_destroy().
| void dialog_update_db | ( | unsigned int | ticks, | |
| void * | param | |||
| ) |
Definition at line 567 of file dlg_db_handler.c.
References dlg_cell::bind_addr, dlg_cell::callid, dlg_cell::contact, dlg_cell::cseq, d_table, DB_INT, DB_STR, dlg_cell::dflags, DIALOG_TABLE_COL_NO, DLG_CALLEE_LEG, DLG_CALLER_LEG, DLG_FLAG_CHANGED, DLG_FLAG_NEW, dlg_lock, dlg_unlock, dlg_table::entries, dlg_entry::first, dlg_cell::from_uri, get_ticks(), dlg_cell::h_entry, dlg_cell::h_id, db_func::insert, LM_DBG, LM_ERR, dlg_cell::next, NULL, dlg_cell::route_set, SET_NULL_FLAG, SET_PROPER_NULL_FLAG, SET_STR_VALUE, dlg_cell::sflags, dlg_table::size, socket_info::sock_str, dlg_cell::start_ts, dlg_cell::state, dlg_cell::tag, dlg_tl::timeout, dlg_cell::tl, dlg_cell::to_uri, dlg_cell::toroute, db_func::update, use_dialog_table(), VAL_INT, and VAL_TYPE.
Referenced by init_dlg_db(), and mod_destroy().
| int dlg_connect_db | ( | const str * | db_url | ) |
Definition at line 113 of file dlg_db_handler.c.
References db_func::init, and LM_CRIT.
Referenced by child_init(), and init_dlg_db().
| int init_dlg_db | ( | const str * | db_url, | |
| int | dlg_hash_size, | |||
| int | db_update_period, | |||
| int | fetch_num_rows | |||
| ) |
Definition at line 125 of file dlg_db_handler.c.
References db_func::close, db_bind_mod(), db_check_table_version(), DB_MODE_DELAYED, dialog_update_db(), dlg_connect_db(), dlg_db_mode, DLG_TABLE_VERSION, LM_ERR, load_dialog_info_from_db(), and register_timer().
Referenced by mod_init().
| int remove_dialog_from_db | ( | struct dlg_cell * | cell | ) |
Definition at line 412 of file dlg_db_handler.c.
References dlg_cell::callid, DB_INT, db_func::delete, dlg_cell::dflags, DLG_FLAG_NEW, dlg_cell::h_entry, dlg_cell::h_id, _str::len, LM_DBG, LM_ERR, _str::s, use_dialog_table(), VAL_INT, VAL_NULL, and VAL_TYPE.
Referenced by bye_reply_cb(), dlg_onroute(), and dlg_ontimeout().
| int update_dialog_dbinfo | ( | struct dlg_cell * | cell | ) |
Definition at line 443 of file dlg_db_handler.c.
References dlg_cell::bind_addr, dlg_cell::callid, dlg_cell::contact, dlg_cell::cseq, d_table, DB_INT, DB_STR, dlg_cell::dflags, DIALOG_TABLE_COL_NO, DLG_CALLEE_LEG, DLG_CALLER_LEG, DLG_FLAG_CHANGED, DLG_FLAG_NEW, dlg_lock, dlg_unlock, dlg_table::entries, dlg_cell::from_uri, get_ticks(), dlg_cell::h_entry, dlg_cell::h_id, db_func::insert, _str::len, LM_DBG, LM_ERR, dlg_cell::route_set, _str::s, SET_NULL_FLAG, SET_PROPER_NULL_FLAG, SET_STR_VALUE, dlg_cell::sflags, socket_info::sock_str, dlg_cell::start_ts, dlg_cell::state, dlg_cell::tag, dlg_tl::timeout, dlg_cell::tl, dlg_cell::to_uri, dlg_cell::toroute, db_func::update, use_dialog_table(), VAL_INT, VAL_NULL, and VAL_TYPE.
Referenced by dlg_onreply(), and dlg_onroute().
| int dlg_db_mode |
Definition at line 64 of file dlg_db_handler.c.
Referenced by bye_reply_cb(), child_init(), dlg_onreply(), dlg_onroute(), dlg_ontimeout(), init_dlg_db(), mod_destroy(), and mod_init().
1.5.6