Functions

km_bdb_lib.h File Reference

Berkeley DB : More...

#include <stdlib.h>
#include <syslog.h>
#include <sys/stat.h>
#include <db.h>
#include "../../str.h"
#include "../../lib/srdb1/db.h"
#include "../../lib/srdb1/db_val.h"
#include "../../locking.h"
Include dependency graph for km_bdb_lib.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions


Detailed Description

Definition in file km_bdb_lib.h.


Function Documentation

int km_bdblib_close ( char *  _n  ) 

assumes the lib data-structures are already initialzed; used to sync and reload the db file.

Definition at line 111 of file km_bdb_lib.c.

References _str::len, and _str::s.

table_p km_bdblib_create_table ( database_p  _db,
str _s 
)

On startup, we do not create any of the db handles. Instead it is done on first-use (lazy-initialized) to only create handles to files (db) that we require.

There is one db file per openser table (eg. acc), and they should exist in your DB_PATH (refer to kamctlrc) directory.

This function does _not_ create the underlying binary db tables. Creating the tables MUST be manually performed before openser startup by 'kamdbctl create'

Function returns NULL on error, which will cause openser to exit.

Definition at line 569 of file km_bdb_lib.c.

References _str::len, and _str::s.

Referenced by km_bdblib_get_table().

Here is the caller graph for this function:

tbl_cache_p km_bdblib_get_table ( database_p  _db,
str _s 
)

if dne, create a new one and add to the list

Definition at line 428 of file km_bdb_lib.c.

References km_bdblib_create_table(), _str::len, and _str::s.

Here is the call graph for this function:

int km_bdblib_reopen ( char *  _n  ) 

assumes the lib data-structures are already initialzed; used to sync and reload the db file.

Definition at line 195 of file km_bdb_lib.c.

References _str::len, and _str::s.