#include "../../mem/shm_mem.h"#include "../../db/db.h"#include "../../dprint.h"#include "../../str.h"#include "cpl_db.h"

Go to the source code of this file.
Defines | |
| #define | TABLE_VERSION 1 |
Functions | |
| int | cpl_db_bind (const str *db_url, const str *db_table) |
| void | cpl_db_close (void) |
| int | cpl_db_init (const str *db_url, const str *db_table) |
| int | get_user_script (str *username, str *domain, str *script, str *key) |
| int | rmv_from_db (str *username, str *domain) |
| int | write_to_db (str *username, str *domain, str *xml, str *bin) |
Variables | |
| str | cpl_bin_col = str_init("cpl_bin") |
| static db_func_t | cpl_dbf |
| str | cpl_domain_col = str_init("domain") |
| str | cpl_username_col = str_init("username") |
| str | cpl_xml_col = str_init("cpl_xml") |
| static db_con_t * | db_hdl = 0 |
Definition at line 45 of file cpl_db.c.
References cpl_db_close(), cpl_db_init(), db_bind_mod(), DB_CAP_ALL, DB_CAPABILITY, db_check_table_version(), LM_CRIT, LM_ERR, and TABLE_VERSION.
Referenced by cpl_init().
| void cpl_db_close | ( | void | ) |
Definition at line 99 of file cpl_db.c.
References db_func::close.
Referenced by cpl_db_bind(), and cpl_db_init().
Definition at line 75 of file cpl_db.c.
References cpl_db_close(), db_func::init, _str::len, LM_CRIT, _str::s, and db_func::use_table.
Referenced by cpl_child_init(), cpl_db_bind(), and mi_child_init().
Definition at line 113 of file cpl_db.c.
References db_val_t::blob_val, DB_STR, db_func::free_result, keys_cmp, _str::len, LM_DBG, LM_ERR, db_res::n, db_val_t::nul, NULL, db_func::query, db_res::rows, _str::s, shm_malloc(), db_val_t::str_val, db_val_t::type, db_val_t::val, vals, and db_row::values.
Referenced by cpl_invoke_script(), do_script_download(), and mi_cpl_get().
Definition at line 260 of file cpl_db.c.
References DB_STR, db_func::delete, _str::len, LM_ERR, db_val_t::nul, NULL, _str::s, db_val_t::str_val, db_val_t::type, db_val_t::val, and vals.
Referenced by do_script_action(), and mi_cpl_remove().
Definition at line 186 of file cpl_db.c.
References db_val_t::blob_val, DB_BLOB, DB_STR, db_func::insert, _str::len, LM_DBG, LM_ERR, db_res::n, db_val_t::nul, NULL, db_func::query, _str::s, db_val_t::str_val, db_val_t::type, db_func::update, db_val_t::val, and vals.
Referenced by do_script_action(), and mi_cpl_load().
| str cpl_bin_col = str_init("cpl_bin") |
| str cpl_domain_col = str_init("domain") |
| str cpl_username_col = str_init("username") |
| str cpl_xml_col = str_init("cpl_xml") |
1.5.6