bdb_val.c File Reference

#include "../../db/db_val.h"
#include "../../db/db_ut.h"
#include "db_berkeley.h"
#include "bdb_res.h"
#include "bdb_val.h"
#include <string.h>

Include dependency graph for bdb_val.c:

Go to the source code of this file.

Functions

int bdb_str2val (db_type_t _t, db_val_t *_v, char *_s, int _l)
int bdb_time2str (time_t _v, char *_s, int *_l)
int bdb_val2str (db_val_t *_v, char *_s, int *_len)


Function Documentation

int bdb_str2val ( db_type_t  _t,
db_val_t _v,
char *  _s,
int  _l 
)

int bdb_time2str ( time_t  _v,
char *  _s,
int *  _l 
) [inline]

A copy of db_ut::db_time2str EXCEPT does not wrap the date in single-quotes

Convert a time_t value to string (w.o single-quote)

Parameters:
_v source value
_s target string
_l available length and target length
Returns:
-1 on error, 0 on success
Todo:
This functions add quotes to the time value. This should be done in the val2str function, as some databases like db_berkeley don't need or like this at all.

Definition at line 50 of file bdb_val.c.

References LM_ERR, and NULL.

Referenced by bdb_val2str().

int bdb_val2str ( db_val_t _v,
char *  _s,
int *  _len 
)


Generated on Thu May 17 12:00:35 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6