dbt_lib.c File Reference

#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <dirent.h>
#include "../../mem/shm_mem.h"
#include "../../mem/mem.h"
#include "../../dprint.h"
#include "dbt_util.h"
#include "dbt_lib.h"

Include dependency graph for dbt_lib.c:

Go to the source code of this file.

Defines

#define DBT_CACHETBL_SIZE   16

Functions

int dbt_cache_check_db (str *_s)
int dbt_cache_destroy (void)
dbt_cache_p dbt_cache_get_db (str *_s)
int dbt_cache_print (int _f)
int dbt_db_del_table (dbt_cache_p _dc, const str *_s, int sync)
dbt_table_p dbt_db_get_table (dbt_cache_p _dc, const str *_s)
int dbt_init_cache (void)
int dbt_is_neq_type (db_type_t _t0, db_type_t _t1)
int dbt_release_table (dbt_cache_p _dc, const str *_s)

Variables

static dbt_cache_p_dbt_cachedb = NULL
static gen_lock_t * _dbt_cachesem = NULL
static dbt_tbl_cachel_p _dbt_cachetbl = NULL


Define Documentation

#define DBT_CACHETBL_SIZE   16


Function Documentation

int dbt_cache_check_db ( str _s  ) 

Definition at line 185 of file dbt_lib.c.

References _dbt_cachesem, _str::len, _dbt_cache::name, _dbt_cache::next, NULL, and _str::s.

int dbt_cache_destroy ( void   ) 

dbt_cache_p dbt_cache_get_db ( str _s  ) 

int dbt_cache_print ( int  _f  ) 

int dbt_db_del_table ( dbt_cache_p  _dc,
const str _s,
int  sync 
)

dbt_table_p dbt_db_get_table ( dbt_cache_p  _dc,
const str _s 
)

int dbt_init_cache ( void   ) 

Definition at line 53 of file dbt_lib.c.

References _dbt_cachesem, DBT_CACHETBL_SIZE, LM_CRIT, NULL, shm_free, and shm_malloc().

Referenced by mod_init().

int dbt_is_neq_type ( db_type_t  _t0,
db_type_t  _t1 
)

int dbt_release_table ( dbt_cache_p  _dc,
const str _s 
)

Definition at line 322 of file dbt_lib.c.

References core_hash(), DBT_CACHETBL_SIZE, hash, _str::len, _dbt_cache::name, and _str::s.

Referenced by dbt_delete(), dbt_insert(), dbt_query(), and dbt_update().


Variable Documentation

dbt_cache_p* _dbt_cachedb = NULL [static]

Definition at line 43 of file dbt_lib.c.

gen_lock_t* _dbt_cachesem = NULL [static]

Definition at line 44 of file dbt_lib.c.

Referenced by dbt_cache_check_db(), dbt_cache_destroy(), dbt_cache_get_db(), and dbt_init_cache().

Definition at line 46 of file dbt_lib.c.


Generated on Tue May 22 14:00:35 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6