[SR-Dev] sr-dev post from new at sip-router.org requires approval

Andrei Pelinescu-Onciul andrei at iptel.org
Fri Feb 13 12:41:41 CET 2009


On Feb 13, 2009 at 00:03, Jan Janak <jan at iptel.org> wrote:
[...]

> 
> I will send a script to update other modules later tomorrow and also upload
> the updated mysql driver which works with both versions of the database
> library (i.e. that module should work with both ser and kamailio).

We should put it somewhere on the repo. We will need 2 scripts: one to
update ser modules to sr and one for kamailio modules.
I think for ser we need to add the ser mod interface define to the
Makefile and update the db stuff. For kamailio we need the same + update
mi path in includes.

Andrei

> 
> On 12-02 23:25, sr-dev-owner at lists.sip-router.org wrote:
> > As list administrator, your authorization is requested for the
> > following mailing list posting:
> > 
> >     List:    sr-dev at lists.sip-router.org
> >     From:    new at sip-router.org
> >     Subject: text/plain; charset=UTF-8
> >     Reason:  Post by non-member to a members-only list
> > 
> > At your convenience, visit:
> > 
> >     http://lists.sip-router.org/cgi-bin/mailman/admindb/sr-dev
> >         
> > to approve or deny the request.
> 
> > Date: Thu, 12 Feb 2009 23:25:34 +0100 (CET)
> > From: New at sip-router.org, commits at sip-router.org, on at sip-router.org,
> > 	branch at sip-router.org, master at sip-router.org
> > Subject: text/plain; charset=UTF-8
> > To: sr-dev at lists.sip-router.org
> > 
> 
> > From: sr-dev-request at lists.sip-router.org
> > Subject: confirm af3499ce3479bf6be60ee69ed389474e0ddabf1c
> > 
> > If you reply to this message, keeping the Subject: header intact,
> > Mailman will discard the held message.  Do this if the message is
> > spam.  If you reply to this message and include an Approved: header
> > with the list password in it, the message will be approved for posting
> > to the list.  The Approved: header can also appear in the first line
> > of the body of the reply.

> >From a5071c502ceb51e09a6ca7805396d3f0cd6b026e Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:14:43 +0100
> Subject: [PATCH] Rename db_con_t to db1_con_t to avoid conflicts with libsrdb2.
> 
> Both libraries libsrdb1 and libsrdb2 contain the data structure
> db_con_t and in one if them the data structure needs to be renamed so
> that both libraries can be used from one SER module at the same time.
> ---
>  lib/srdb1/db.c       |   16 ++++++++--------
>  lib/srdb1/db.h       |   36 ++++++++++++++++++------------------
>  lib/srdb1/db_con.h   |    2 +-
>  lib/srdb1/db_query.c |   38 +++++++++++++++++++-------------------
>  lib/srdb1/db_query.h |   38 +++++++++++++++++++-------------------
>  lib/srdb1/db_ut.c    |   12 ++++++------
>  lib/srdb1/db_ut.h    |   12 ++++++------
>  lib/srdb1/db_val.c   |    2 +-
>  lib/srdb1/db_val.h   |    2 +-
>  9 files changed, 79 insertions(+), 79 deletions(-)
> 
> diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
> index f424804..16fa907 100644
> --- a/lib/srdb1/db.c
> +++ b/lib/srdb1/db.c
> @@ -245,13 +245,13 @@ error:
>   * Initialize database module
>   * \note No function should be called before this
>   */
> -db_con_t* db_do_init(const str* url, void* (*new_connection)())
> +db1_con_t* db_do_init(const str* url, void* (*new_connection)())
>  {
>  	struct db_id* id;
>  	void* con;
> -	db_con_t* res;
> +	db1_con_t* res;
>  
> -	int con_size = sizeof(db_con_t) + sizeof(void *);
> +	int con_size = sizeof(db1_con_t) + sizeof(void *);
>  	id = 0;
>  	res = 0;
>  
> @@ -266,7 +266,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)())
>  	}
>  	
>  	/* this is the root memory for this database connection. */
> -	res = (db_con_t*)pkg_malloc(con_size);
> +	res = (db1_con_t*)pkg_malloc(con_size);
>  	if (!res) {
>  		LM_ERR("no private memory left\n");
>  		return 0;
> @@ -308,7 +308,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)())
>   * Shut down database module
>   * \note No function should be called after this
>   */
> -void db_do_close(db_con_t* _h, void (*free_connection)())
> +void db_do_close(db1_con_t* _h, void (*free_connection)())
>  {
>  	struct pool_con* con;
>  
> @@ -334,7 +334,7 @@ void db_do_close(db_con_t* _h, void (*free_connection)())
>   * \param table
>   * \return If there is no row for the given table, return version 0
>   */
> -int db_table_version(const db_func_t* dbf, db_con_t* connection, const str* table)
> +int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* table)
>  {
>  	db_key_t key[1], col[1];
>  	db_val_t val[1];
> @@ -399,7 +399,7 @@ int db_table_version(const db_func_t* dbf, db_con_t* connection, const str* tabl
>   * Check the table version
>   * 0 means ok, -1 means an error occured
>   */
> -int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, const unsigned int version)
> +int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const unsigned int version)
>  {
>  	int ver = db_table_version(dbf, dbh, table);
>  	if (ver < 0) {
> @@ -416,7 +416,7 @@ int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, cons
>   * Store name of table that will be used by
>   * subsequent database functions
>   */
> -int db_use_table(db_con_t* _h, const str* _t)
> +int db_use_table(db1_con_t* _h, const str* _t)
>  {
>  	if (!_h || !_t || !_t->s) {
>  		LM_ERR("invalid parameter value\n");
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 7a6bd79..8c2895f 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -62,7 +62,7 @@
>   * \param _t table name
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_use_table_f)(db_con_t* _h, const str * _t);
> +typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
>  
>  /**
>   * \brief Initialize database connection and obtain the connection handle.
> @@ -86,7 +86,7 @@ typedef int (*db_use_table_f)(db_con_t* _h, const str * _t);
>   * \return returns a pointer to the db_con_t representing the connection if it was
>   * successful, otherwise 0 is returned
>   */
> -typedef db_con_t* (*db_init_f) (const str* _sqlurl);
> +typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
>  
>  /**
>   * \brief Close a database connection and free all memory used.
> @@ -95,7 +95,7 @@ typedef db_con_t* (*db_init_f) (const str* _sqlurl);
>   * allocated memory. The function db_close must be the very last function called.
>   * \param _h db_con_t structure representing the database connection
>   */
> -typedef void (*db_close_f) (db_con_t* _h); 
> +typedef void (*db_close_f) (db1_con_t* _h); 
>  
>  
>  /**
> @@ -127,7 +127,7 @@ typedef void (*db_close_f) (db_con_t* _h);
>   * \param _r address of variable where pointer to the result will be stored
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_query_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
> +typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  				const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
>  				const db_key_t _o, db_res_t** _r);
>  
> @@ -146,7 +146,7 @@ typedef int (*db_query_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t
>   * \param _n the number of rows that should be fetched
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_fetch_result_f) (const db_con_t* _h, db_res_t** _r, const int _n);
> +typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r, const int _n);
>  
>  
>  /**
> @@ -164,7 +164,7 @@ typedef int (*db_fetch_result_f) (const db_con_t* _h, db_res_t** _r, const int _
>   * \param _r structure for the result
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_raw_query_f) (const db_con_t* _h, const str* _s, db_res_t** _r);
> +typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db_res_t** _r);
>  
>  
>  /**
> @@ -177,7 +177,7 @@ typedef int (*db_raw_query_f) (const db_con_t* _h, const str* _s, db_res_t** _r)
>   * \param _r pointer to db_res_t structure to destroy
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_free_result_f) (db_con_t* _h, db_res_t* _r);
> +typedef int (*db_free_result_f) (db1_con_t* _h, db_res_t* _r);
>  
>  
>  /**
> @@ -191,7 +191,7 @@ typedef int (*db_free_result_f) (db_con_t* _h, db_res_t* _r);
>   * \param _n number of keys-value pairs int _k and _v parameters
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_insert_f) (const db_con_t* _h, const db_key_t* _k,
> +typedef int (*db_insert_f) (const db1_con_t* _h, const db_key_t* _k,
>  				const db_val_t* _v, const int _n);
>  
>  
> @@ -211,7 +211,7 @@ typedef int (*db_insert_f) (const db_con_t* _h, const db_key_t* _k,
>   * \param _n number of keys-value parameters in _k and _v parameters
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_delete_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +typedef int (*db_delete_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>  				const db_val_t* _v, const int _n);
>  
>  
> @@ -230,7 +230,7 @@ typedef int (*db_delete_f) (const db_con_t* _h, const db_key_t* _k, const db_op_
>   * \param _un number of key-value pairs in _uk and _uv parameters
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_update_f) (const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +typedef int (*db_update_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>  				const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv,
>  				const int _n, const int _un);
>  
> @@ -247,7 +247,7 @@ typedef int (*db_update_f) (const db_con_t* _h, const db_key_t* _k, const db_op_
>   * \param _n number of key=value pairs
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>  */
> -typedef int (*db_replace_f) (const db_con_t* handle, const db_key_t* keys,
> +typedef int (*db_replace_f) (const db1_con_t* handle, const db_key_t* keys,
>  				const db_val_t* vals, const int n);
>  
>  
> @@ -262,7 +262,7 @@ typedef int (*db_replace_f) (const db_con_t* handle, const db_key_t* keys,
>   * \return returns the ID as integer or returns 0 if the previous statement
>   * does not use an AUTO_INCREMENT value.
>   */
> -typedef int (*db_last_inserted_id_f) (const db_con_t* _h);
> +typedef int (*db_last_inserted_id_f) (const db1_con_t* _h);
>  
>  
>  /**
> @@ -277,7 +277,7 @@ typedef int (*db_last_inserted_id_f) (const db_con_t* _h);
>   * \param _n number of key=value pairs
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_insert_update_f) (const db_con_t* _h, const db_key_t* _k,
> +typedef int (*db_insert_update_f) (const db1_con_t* _h, const db_key_t* _k,
>  				const db_val_t* _v, const int _n);
>  
>  
> @@ -338,7 +338,7 @@ int db_bind_mod(const str* mod, db_func_t* dbf);
>   * \return returns a pointer to the db_con_t representing the connection if it was
>     successful, otherwise 0 is returned.
>   */
> -db_con_t* db_do_init(const str* url, void* (*new_connection)());
> +db1_con_t* db_do_init(const str* url, void* (*new_connection)());
>  
>  
>  /**
> @@ -349,7 +349,7 @@ db_con_t* db_do_init(const str* url, void* (*new_connection)());
>   * \param _h database connection handle
>   * \param (*free_connection) Pointer to the db specifc free_connection method
>   */
> -void db_do_close(db_con_t* _h, void (*free_connection)());
> +void db_do_close(db1_con_t* _h, void (*free_connection)());
>  
>  
>  /**
> @@ -362,7 +362,7 @@ void db_do_close(db_con_t* _h, void (*free_connection)());
>   * \param table checked table
>   * \return the version number if present, 0 if no version data available, < 0 on error
>   */
> -int db_table_version(const db_func_t* dbf, db_con_t* con, const str* table);
> +int db_table_version(const db_func_t* dbf, db1_con_t* con, const str* table);
>  
>  /**
>   * \brief Check the table version
> @@ -374,7 +374,7 @@ int db_table_version(const db_func_t* dbf, db_con_t* con, const str* table);
>   * \param version checked version
>   * \return 0 means ok, -1 means an error occured
>   */
> -int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, const unsigned int version);
> +int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, const unsigned int version);
>  
>  /**
>   * \brief Stores the name of a table.
> @@ -385,7 +385,7 @@ int db_check_table_version(db_func_t* dbf, db_con_t* dbh, const str* table, cons
>   * \param _t stored name
>   * \return 0 if everything is ok, otherwise returns value < 0
>   */
> -int db_use_table(db_con_t* _h, const str* _t);
> +int db_use_table(db1_con_t* _h, const str* _t);
>  
>  /**
>   * \brief Bind the DB API exported by a module.
> diff --git a/lib/srdb1/db_con.h b/lib/srdb1/db_con.h
> index 7804f07..0cb6514 100644
> --- a/lib/srdb1/db_con.h
> +++ b/lib/srdb1/db_con.h
> @@ -40,7 +40,7 @@
>  typedef struct {
>  	const str* table;      /*!< Default table that should be used              */
>  	unsigned long tail;    /*!< Variable length tail, database module specific */
> -} db_con_t;
> +} db1_con_t;
>  
>  
>  /** Return the table of the connection handle */
> diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
> index 609e935..a540c30 100644
> --- a/lib/srdb1/db_query.c
> +++ b/lib/srdb1/db_query.c
> @@ -40,11 +40,11 @@
>  static str  sql_str;
>  static char sql_buf[SQL_BUF_LEN];
>  
> -int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
> +int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  	const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
> -	const db_key_t _o, db_res_t** _r, int (*val2str) (const db_con_t*,
> -	const db_val_t*, char*, int* _len), int (*submit_query)(const db_con_t*,
> -	const str*), int (*store_result)(const db_con_t* _h, db_res_t** _r))
> +	const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
> +	const db_val_t*, char*, int* _len), int (*submit_query)(const db1_con_t*,
> +	const str*), int (*store_result)(const db1_con_t* _h, db_res_t** _r))
>  {
>  	int off, ret;
>  
> @@ -117,9 +117,9 @@ error:
>  }
>  
>  
> -int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
> -	int (*submit_query)(const db_con_t* _h, const str* _c),
> -	int (*store_result)(const db_con_t* _h, db_res_t** _r))
> +int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
> +	int (*submit_query)(const db1_con_t* _h, const str* _c),
> +	int (*store_result)(const db1_con_t* _h, db_res_t** _r))
>  {
>  	if (!_h || !_s || !submit_query || !store_result) {
>  		LM_ERR("invalid parameter value\n");
> @@ -142,9 +142,9 @@ int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
>  }
>  
>  
> -int db_do_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> -	const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
> -	int (*submit_query)(const db_con_t* _h, const str* _c))
> +int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> +	const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
> +	int (*submit_query)(const db1_con_t* _h, const str* _c))
>  {
>  	int off, ret;
>  
> @@ -187,9 +187,9 @@ error:
>  }
>  
>  
> -int db_do_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> -	const db_val_t* _v, const int _n, int (*val2str) (const db_con_t*,
> -	const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
> +int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +	const db_val_t* _v, const int _n, int (*val2str) (const db1_con_t*,
> +	const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
>  	const str* _c))
>  {
>  	int off, ret;
> @@ -230,10 +230,10 @@ error:
>  }
>  
>  
> -int db_do_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +int db_do_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>  	const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv, const int _n,
> -	const int _un, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
> -	int (*submit_query)(const db_con_t* _h, const str* _c))
> +	const int _un, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
> +	int (*submit_query)(const db1_con_t* _h, const str* _c))
>  {
>  	int off, ret;
>  
> @@ -276,9 +276,9 @@ error:
>  }
>  
>  
> -int db_do_replace(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> -	const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*,
> -	int*), int (*submit_query)(const db_con_t* _h, const str* _c))
> +int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> +	const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*,
> +	int*), int (*submit_query)(const db1_con_t* _h, const str* _c))
>  {
>  	int off, ret;
>  
> diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
> index c1c99c0..3dbf1a4 100644
> --- a/lib/srdb1/db_query.h
> +++ b/lib/srdb1/db_query.h
> @@ -66,11 +66,11 @@
>   * \param (*store_result) function pointer to the db specific store result function
>   * \return zero on success, negative on errors
>   */
> -int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
> +int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  	const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
> -	const db_key_t _o, db_res_t** _r, int (*val2str) (const db_con_t*,
> -	const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
> -	const str* _c), int (*store_result)(const db_con_t* _h, db_res_t** _r));
> +	const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
> +	const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
> +	const str* _c), int (*store_result)(const db1_con_t* _h, db_res_t** _r));
>  
>  
>  /**
> @@ -88,9 +88,9 @@ int db_do_query(const db_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>   * \param (*store_result) function pointer to the db specific store result function
>   * \return zero on success, negative on errors
>   */
> -int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
> -	int (*submit_query)(const db_con_t* _h, const str* _c),
> -	int (*store_result)(const db_con_t* _h, db_res_t** _r));
> +int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
> +	int (*submit_query)(const db1_con_t* _h, const str* _c),
> +	int (*store_result)(const db1_con_t* _h, db_res_t** _r));
>  
>  
>  /**
> @@ -109,9 +109,9 @@ int db_do_raw_query(const db_con_t* _h, const str* _s, db_res_t** _r,
>   * \param (*submit_query) function pointer to the db specific query submit function
>   * \return zero on success, negative on errors
>   */
> -int db_do_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> -	const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
> -	int (*submit_query)(const db_con_t* _h, const str* _c));
> +int db_do_insert(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> +	const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
> +	int (*submit_query)(const db1_con_t* _h, const str* _c));
>  
>  
>  /**
> @@ -131,9 +131,9 @@ int db_do_insert(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
>   * \param (*submit_query) function pointer to the db specific query submit function
>   * \return zero on success, negative on errors
>   */
> -int db_do_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> -	const db_val_t* _v, const int _n, int (*val2str) (const db_con_t*,
> -	const db_val_t*, char*, int*), int (*submit_query)(const db_con_t* _h,
> +int db_do_delete(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +	const db_val_t* _v, const int _n, int (*val2str) (const db1_con_t*,
> +	const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
>  	const str* _c));
>  
>  
> @@ -157,10 +157,10 @@ int db_do_delete(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>   * \param (*submit_query) function pointer to the db specific query submit function
>   * \return zero on success, negative on errors
>   */
> -int db_do_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
> +int db_do_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>  	const db_val_t* _v, const db_key_t* _uk, const db_val_t* _uv, const int _n,
> -	const int _un, int (*val2str) (const db_con_t*, const db_val_t*, char*, int*),
> -	int (*submit_query)(const db_con_t* _h, const str* _c));
> +	const int _un, int (*val2str) (const db1_con_t*, const db_val_t*, char*, int*),
> +	int (*submit_query)(const db1_con_t* _h, const str* _c));
>  
>  
>  /**
> @@ -179,9 +179,9 @@ int db_do_update(const db_con_t* _h, const db_key_t* _k, const db_op_t* _o,
>   * \param (*submit_query) function pointer to the db specific query submit function
>   * \return zero on success, negative on errors
>   */
> -int db_do_replace(const db_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> -	const int _n, int (*val2str) (const db_con_t*, const db_val_t*, char*,
> -	int*), int (*submit_query)(const db_con_t* _h, const str* _c));
> +int db_do_replace(const db1_con_t* _h, const db_key_t* _k, const db_val_t* _v,
> +	const int _n, int (*val2str) (const db1_con_t*, const db_val_t*, char*,
> +	int*), int (*submit_query)(const db1_con_t* _h, const str* _c));
>  
>  
>  #endif
> diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
> index cf7abf3..2d65e19 100644
> --- a/lib/srdb1/db_ut.c
> +++ b/lib/srdb1/db_ut.c
> @@ -265,8 +265,8 @@ inline int db_print_columns(char* _b, const int _l, const db_key_t* _c, const in
>  /*
>   * Print values of SQL statement
>   */
> -int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t* _v,
> -	const int _n, int (*val2str)(const db_con_t*, const db_val_t*, char*, int*))
> +int db_print_values(const db1_con_t* _c, char* _b, const int _l, const db_val_t* _v,
> +	const int _n, int (*val2str)(const db1_con_t*, const db_val_t*, char*, int*))
>  {
>  	int i, l, len = 0;
>  
> @@ -294,9 +294,9 @@ int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t*
>  /*
>   * Print where clause of SQL statement
>   */
> -int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
> +int db_print_where(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
>  	const db_op_t* _o, const db_val_t* _v, const int _n, int (*val2str)
> -	(const 	db_con_t*, const db_val_t*, char*, int*))
> +	(const 	db1_con_t*, const db_val_t*, char*, int*))
>  {
>  	int i, l, ret, len = 0;
>  
> @@ -338,8 +338,8 @@ int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _
>  /*
>   * Print set clause of update SQL statement
>   */
> -int db_print_set(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
> -	const db_val_t* _v, const int _n, int (*val2str)(const db_con_t*,
> +int db_print_set(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
> +	const db_val_t* _v, const int _n, int (*val2str)(const db1_con_t*,
>  	const db_val_t*,char*, int*))
>  {
>  	int i, l, ret, len = 0;
> diff --git a/lib/srdb1/db_ut.h b/lib/srdb1/db_ut.h
> index cc5fbcc..f821a09 100644
> --- a/lib/srdb1/db_ut.h
> +++ b/lib/srdb1/db_ut.h
> @@ -168,8 +168,8 @@ int db_print_columns(char* _b, const int _l, const db_key_t* _c, const int _n);
>   * \param  (*val2str) function pointer to a db specific conversion function
>   * \return the length of the printed result on success, negative on errors
>   */
> -int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t* _v,
> -	const int _n, int (*val2str)(const db_con_t*, const db_val_t*, char*, int*));
> +int db_print_values(const db1_con_t* _c, char* _b, const int _l, const db_val_t* _v,
> +	const int _n, int (*val2str)(const db1_con_t*, const db_val_t*, char*, int*));
>  
>  
>  /**
> @@ -185,9 +185,9 @@ int db_print_values(const db_con_t* _c, char* _b, const int _l, const db_val_t*
>   * \param  (*val2str) function pointer to a db specific conversion function
>   * \return the length of the printed result on success, negative on errors
>   */
> -int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _k,
> +int db_print_where(const db1_con_t* _c, char* _b, const int _l, const db_key_t* _k,
>  	const db_op_t* _o, const db_val_t* _v, const int _n, int (*val2str)
> -	(const 	db_con_t*, const db_val_t*, char*, int*));
> +	(const 	db1_con_t*, const db_val_t*, char*, int*));
>  
>  
>  /**
> @@ -202,8 +202,8 @@ int db_print_where(const db_con_t* _c, char* _b, const int _l, const db_key_t* _
>   * \param  (*val2str) function pointer to a db specific conversion function
>   * \return the length of the printed result on success, negative on errors
>   */
> -int db_print_set(const db_con_t* _c, char* _b, const int _l,
> +int db_print_set(const db1_con_t* _c, char* _b, const int _l,
>  	const db_key_t* _k, const db_val_t* _v, const int _n, int (*val2str)
> -	(const db_con_t*, const db_val_t*, char*, int*));
> +	(const db1_con_t*, const db_val_t*, char*, int*));
>  
>  #endif
> diff --git a/lib/srdb1/db_val.c b/lib/srdb1/db_val.c
> index 14921ab..2d6ebc9 100644
> --- a/lib/srdb1/db_val.c
> +++ b/lib/srdb1/db_val.c
> @@ -199,7 +199,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>   * \param _len target string length
>   * \return 0 on success, negative on error, 1 if value must be converted by other means
>   */
> -int db_val2str(const db_con_t* _c, const db_val_t* _v, char* _s, int* _len)
> +int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  {
>  	if (!_c || !_v || !_s || !_len || !*_len) {
>  		LM_ERR("invalid parameter value\n");
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index 06a9845..3e56c0b 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -193,6 +193,6 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>   * \param _len target string length
>   * \return 0 on success, negative on error, 1 if value must be converted by other means
>   */
> -int db_val2str(const db_con_t* _c, const db_val_t* _v, char* _s, int* _len);
> +int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len);
>  
>  #endif /* DB_VAL_H */
> -- 
> 1.5.6.5
> 

> >From 3561d314a524eee363847ebb61e11bb1f9d63f4b Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:15:29 +0100
> Subject: [PATCH] Rename db_con_t to db1_con_t in doxygen documentation.
> 
> ---
>  lib/srdb1/db.h |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 8c2895f..2f819ae 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -55,7 +55,7 @@
>  /**
>   * \brief Specify table name that will be used for subsequent operations.
>   * 
> - * The function db_use_table takes a table name and stores it db_con_t structure.
> + * The function db_use_table takes a table name and stores it db1_con_t structure.
>   * All subsequent operations (insert, delete, update, query) are performed on
>   * that table.
>   * \param _h database connection handle
> @@ -83,7 +83,7 @@ typedef int (*db_use_table_f)(db1_con_t* _h, const str * _t);
>   * name of the database (optional).
>   * \see bind_dbmod
>   * \param _sqlurl database connection URL
> - * \return returns a pointer to the db_con_t representing the connection if it was
> + * \return returns a pointer to the db1_con_t representing the connection if it was
>   * successful, otherwise 0 is returned
>   */
>  typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
> @@ -93,7 +93,7 @@ typedef db1_con_t* (*db_init_f) (const str* _sqlurl);
>   *
>   * The function closes previously open connection and frees all previously 
>   * allocated memory. The function db_close must be the very last function called.
> - * \param _h db_con_t structure representing the database connection
> + * \param _h db1_con_t structure representing the database connection
>   */
>  typedef void (*db_close_f) (db1_con_t* _h); 
>  
> @@ -335,7 +335,7 @@ int db_bind_mod(const str* mod, db_func_t* dbf);
>   * functions.
>   * \param url database connection URL
>   * \param (*new_connection)() Pointer to the db specific connection creation method
> - * \return returns a pointer to the db_con_t representing the connection if it was
> + * \return returns a pointer to the db1_con_t representing the connection if it was
>     successful, otherwise 0 is returned.
>   */
>  db1_con_t* db_do_init(const str* url, void* (*new_connection)());
> @@ -380,7 +380,7 @@ int db_check_table_version(db_func_t* dbf, db1_con_t* dbh, const str* table, con
>   * \brief Stores the name of a table.
>   *
>   * Stores the name of the table that will be used by subsequent database
> - * functions calls in a db_con_t structure.
> + * functions calls in a db1_con_t structure.
>   * \param _h database connection handle
>   * \param _t stored name
>   * \return 0 if everything is ok, otherwise returns value < 0
> -- 
> 1.5.6.5
> 

> >From 13f9c1e6fe82c579c57ebb6f5afe67dd1730e872 Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:16:40 +0100
> Subject: [PATCH] Renamed db_res_t to db1_res_t to avoid conflicts with libsrdb2.
> 
> ---
>  lib/srdb1/db.c       |    2 +-
>  lib/srdb1/db.h       |    8 ++++----
>  lib/srdb1/db_query.c |    8 ++++----
>  lib/srdb1/db_query.h |    8 ++++----
>  lib/srdb1/db_res.c   |   20 ++++++++++----------
>  lib/srdb1/db_res.h   |   16 ++++++++--------
>  lib/srdb1/db_row.c   |    2 +-
>  lib/srdb1/db_row.h   |    2 +-
>  8 files changed, 33 insertions(+), 33 deletions(-)
> 
> diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
> index 16fa907..c705aea 100644
> --- a/lib/srdb1/db.c
> +++ b/lib/srdb1/db.c
> @@ -338,7 +338,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
>  {
>  	db_key_t key[1], col[1];
>  	db_val_t val[1];
> -	db_res_t* res = NULL;
> +	db1_res_t* res = NULL;
>  	db_val_t* ver = 0;
>  
>  	if (!dbf||!connection || !table || !table->s) {
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 2f819ae..1064ed3 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -129,7 +129,7 @@ typedef void (*db_close_f) (db1_con_t* _h);
>   */
>  typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  				const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
> -				const db_key_t _o, db_res_t** _r);
> +				const db_key_t _o, db1_res_t** _r);
>  
>  /**
>   * \brief Gets a partial result set, fetch rows from a result
> @@ -146,7 +146,7 @@ typedef int (*db_query_f) (const db1_con_t* _h, const db_key_t* _k, const db_op_
>   * \param _n the number of rows that should be fetched
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r, const int _n);
> +typedef int (*db_fetch_result_f) (const db1_con_t* _h, db1_res_t** _r, const int _n);
>  
>  
>  /**
> @@ -164,7 +164,7 @@ typedef int (*db_fetch_result_f) (const db1_con_t* _h, db_res_t** _r, const int
>   * \param _r structure for the result
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db_res_t** _r);
> +typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db1_res_t** _r);
>  
>  
>  /**
> @@ -177,7 +177,7 @@ typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db_res_t** _r
>   * \param _r pointer to db_res_t structure to destroy
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
> -typedef int (*db_free_result_f) (db1_con_t* _h, db_res_t* _r);
> +typedef int (*db_free_result_f) (db1_con_t* _h, db1_res_t* _r);
>  
>  
>  /**
> diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
> index a540c30..2d24974 100644
> --- a/lib/srdb1/db_query.c
> +++ b/lib/srdb1/db_query.c
> @@ -42,9 +42,9 @@ static char sql_buf[SQL_BUF_LEN];
>  
>  int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  	const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
> -	const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
> +	const db_key_t _o, db1_res_t** _r, int (*val2str) (const db1_con_t*,
>  	const db_val_t*, char*, int* _len), int (*submit_query)(const db1_con_t*,
> -	const str*), int (*store_result)(const db1_con_t* _h, db_res_t** _r))
> +	const str*), int (*store_result)(const db1_con_t* _h, db1_res_t** _r))
>  {
>  	int off, ret;
>  
> @@ -117,9 +117,9 @@ error:
>  }
>  
>  
> -int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
> +int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
>  	int (*submit_query)(const db1_con_t* _h, const str* _c),
> -	int (*store_result)(const db1_con_t* _h, db_res_t** _r))
> +	int (*store_result)(const db1_con_t* _h, db1_res_t** _r))
>  {
>  	if (!_h || !_s || !submit_query || !store_result) {
>  		LM_ERR("invalid parameter value\n");
> diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
> index 3dbf1a4..9cbc224 100644
> --- a/lib/srdb1/db_query.h
> +++ b/lib/srdb1/db_query.h
> @@ -68,9 +68,9 @@
>   */
>  int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>  	const db_val_t* _v, const db_key_t* _c, const int _n, const int _nc,
> -	const db_key_t _o, db_res_t** _r, int (*val2str) (const db1_con_t*,
> +	const db_key_t _o, db1_res_t** _r, int (*val2str) (const db1_con_t*,
>  	const db_val_t*, char*, int*), int (*submit_query)(const db1_con_t* _h,
> -	const str* _c), int (*store_result)(const db1_con_t* _h, db_res_t** _r));
> +	const str* _c), int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
>  
>  
>  /**
> @@ -88,9 +88,9 @@ int db_do_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op,
>   * \param (*store_result) function pointer to the db specific store result function
>   * \return zero on success, negative on errors
>   */
> -int db_do_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r,
> +int db_do_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r,
>  	int (*submit_query)(const db1_con_t* _h, const str* _c),
> -	int (*store_result)(const db1_con_t* _h, db_res_t** _r));
> +	int (*store_result)(const db1_con_t* _h, db1_res_t** _r));
>  
>  
>  /**
> diff --git a/lib/srdb1/db_res.c b/lib/srdb1/db_res.c
> index b723bdf..16685a8 100644
> --- a/lib/srdb1/db_res.c
> +++ b/lib/srdb1/db_res.c
> @@ -41,7 +41,7 @@
>  /*
>   * Release memory used by rows
>   */
> -inline int db_free_rows(db_res_t* _r)
> +inline int db_free_rows(db1_res_t* _r)
>  {
>  	int i;
>  
> @@ -68,7 +68,7 @@ inline int db_free_rows(db_res_t* _r)
>  /*
>   * Release memory used by columns
>   */
> -inline int db_free_columns(db_res_t* _r)
> +inline int db_free_columns(db1_res_t* _r)
>  {
>  	int col;
>  
> @@ -104,24 +104,24 @@ inline int db_free_columns(db_res_t* _r)
>  /*
>   * Create a new result structure and initialize it
>   */
> -inline db_res_t* db_new_result(void)
> +inline db1_res_t* db_new_result(void)
>  {
> -	db_res_t* r = NULL;
> -	r = (db_res_t*)pkg_malloc(sizeof(db_res_t));
> +	db1_res_t* r = NULL;
> +	r = (db1_res_t*)pkg_malloc(sizeof(db1_res_t));
>  	if (!r) {
>  		LM_ERR("no private memory left\n");
>  		return 0;
>  	}
>  	LM_DBG("allocate %d bytes for result set at %p\n",
> -		(int)sizeof(db_res_t), r);
> -	memset(r, 0, sizeof(db_res_t));
> +		(int)sizeof(db1_res_t), r);
> +	memset(r, 0, sizeof(db1_res_t));
>  	return r;
>  }
>  
>  /*
>   * Release memory used by a result structure
>   */
> -inline int db_free_result(db_res_t* _r)
> +inline int db_free_result(db1_res_t* _r)
>  {
>  	if (!_r)
>  	{
> @@ -141,7 +141,7 @@ inline int db_free_result(db_res_t* _r)
>   * Allocate storage for column names and type in existing
>   * result structure.
>   */
> -inline int db_allocate_columns(db_res_t* _r, const unsigned int cols)
> +inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols)
>  {
>  	RES_NAMES(_r) = (db_key_t*)pkg_malloc(sizeof(db_key_t) * cols);
>  	if (!RES_NAMES(_r)) {
> @@ -171,7 +171,7 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int cols)
>   * \param _res result set
>   * \return zero on success, negative on errors
>   */
> -inline int db_allocate_rows(db_res_t* _res)
> +inline int db_allocate_rows(db1_res_t* _res)
>  {
>  	int len = sizeof(db_row_t) * RES_ROW_N(_res);
>  	RES_ROWS(_res) = (struct db_row*)pkg_malloc(len);
> diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
> index dde8242..40eb09c 100644
> --- a/lib/srdb1/db_res.h
> +++ b/lib/srdb1/db_res.h
> @@ -51,7 +51,7 @@ struct db_row;
>   * In addition to zero or more rows, each db_res_t object contains also an array
>   * of db_key_t objects. The objects represent keys (names of columns). *
>   */
> -typedef struct db_res {
> +typedef struct db1_res {
>  	struct {
>  		db_key_t* names;   /**< Column names                    */
>  		db_type_t* types;  /**< Column types                    */
> @@ -61,7 +61,7 @@ typedef struct db_res {
>  	int n;                 /**< Number of rows in current fetch */
>  	int res_rows;          /**< Number of total rows in query   */
>  	int last_row;          /**< Last row                        */
> -} db_res_t;
> +} db1_res_t;
>  
>  
>  /** Return the column names */
> @@ -85,7 +85,7 @@ typedef struct db_res {
>   * \param _r the result that should be released
>   * \return zero on success, negative on errors
>   */
> -inline int db_free_rows(db_res_t* _r);
> +inline int db_free_rows(db1_res_t* _r);
>  
>  
>  /**
> @@ -95,20 +95,20 @@ inline int db_free_rows(db_res_t* _r);
>   * \param _r the result that should be released
>   * \return zero on success, negative on errors
>   */
> -inline int db_free_columns(db_res_t* _r);
> +inline int db_free_columns(db1_res_t* _r);
>  
>  
>  /**
>   * Create a new result structure and initialize it.
>   * \return a pointer to the new result on success, NULL on errors
>   */
> -inline db_res_t* db_new_result(void);
> +inline db1_res_t* db_new_result(void);
>  
>  /**
>   * Release memory used by a result structure.
>   * \return zero on success, negative on errors
>   */
> -inline int db_free_result(db_res_t* _r);
> +inline int db_free_result(db1_res_t* _r);
>  
>  /**
>   * Allocate storage for column names and type in existing result structure.
> @@ -118,7 +118,7 @@ inline int db_free_result(db_res_t* _r);
>   * \param cols number of columns
>   * \return zero on success, negative on errors
>   */
> -inline int db_allocate_columns(db_res_t* _r, const unsigned int cols);
> +inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
>  
>  
>  /**
> @@ -126,6 +126,6 @@ inline int db_allocate_columns(db_res_t* _r, const unsigned int cols);
>   * \param _res result set
>   * \return zero on success, negative on errors
>   */
> -inline int db_allocate_rows(db_res_t* _res);
> +inline int db_allocate_rows(db1_res_t* _res);
>  
>  #endif /* DB_RES_H */
> diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
> index 8e12903..449f3fd 100644
> --- a/lib/srdb1/db_row.c
> +++ b/lib/srdb1/db_row.c
> @@ -108,7 +108,7 @@ inline int db_free_row(db_row_t* _r)
>   * \param _row filled row
>   * \return zero on success, negative on errors
>   */
> -inline int db_allocate_row(const db_res_t* _res, db_row_t* _row)
> +inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row)
>  {
>  	int len = sizeof(db_val_t) * RES_COL_N(_res);
>  	ROW_VALUES(_row) = (db_val_t*)pkg_malloc(len);
> diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h
> index b786dba..81a53e6 100644
> --- a/lib/srdb1/db_row.h
> +++ b/lib/srdb1/db_row.h
> @@ -71,6 +71,6 @@ inline int db_free_row(db_row_t* _r);
>   * \param _row filled row
>   * \return zero on success, negative on errors
>   */
> -inline int db_allocate_row(const db_res_t* _res, db_row_t* _row);
> +inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row);
>  
>  #endif /* DB_ROW_H */
> -- 
> 1.5.6.5
> 

> >From 20606ac1e48c6913718f15fed0f632fabceb3657 Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:18:57 +0100
> Subject: [PATCH] Renamed db_res_t to db1_res_t in doxygen documentation.
> 
> ---
>  lib/srdb1/db.h     |    4 ++--
>  lib/srdb1/db_res.h |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 1064ed3..5b2c0e8 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -171,10 +171,10 @@ typedef int (*db_raw_query_f) (const db1_con_t* _h, const str* _s, db1_res_t** _
>   * \brief Free a result allocated by db_query.
>   *
>   * This function frees all memory allocated previously in db_query. Its
> - * neccessary to call this function on a db_res_t structure if you don't need the
> + * neccessary to call this function on a db1_res_t structure if you don't need the
>   * structure anymore. You must call this function before you call db_query again!
>   * \param _h database connection handle
> - * \param _r pointer to db_res_t structure to destroy
> + * \param _r pointer to db1_res_t structure to destroy
>   * \return returns 0 if everything is OK, otherwise returns value < 0
>   */
>  typedef int (*db_free_result_f) (db1_con_t* _h, db1_res_t* _r);
> diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
> index 40eb09c..aeab717 100644
> --- a/lib/srdb1/db_res.h
> +++ b/lib/srdb1/db_res.h
> @@ -44,11 +44,11 @@ struct db_row;
>   * This type represents a result returned by db_query function (see below). The 
>   * result can consist of zero or more rows (see db_row_t description).
>   *
> - * Note: A variable of type db_res_t returned by db_query function uses dynamicaly
> + * Note: A variable of type db1_res_t returned by db_query function uses dynamicaly
>   * allocated memory, don't forget to call db_free_result if you don't need the
>   * variable anymore. You will encounter memory leaks if you fail to do this!
>   *
> - * In addition to zero or more rows, each db_res_t object contains also an array
> + * In addition to zero or more rows, each db1_res_t object contains also an array
>   * of db_key_t objects. The objects represent keys (names of columns). *
>   */
>  typedef struct db1_res {
> -- 
> 1.5.6.5
> 

> >From 70fc66d9705f09e52f68af094f0807c85799c15f Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:21:15 +0100
> Subject: [PATCH] Database type enum values (such as DB_INT) renamed to DB1_*.
> 
> Both database libraries define the same database value type names. We
> need to rename them in one of the libraries so that both libraries can
> be used at the same time. Here we chose to rename the enum values in
> libsrdb1 to DB1_*. The same change needs to be done in SER modules
> using this version of the database library.
> ---
>  lib/srdb1/db.c     |    4 ++--
>  lib/srdb1/db_row.c |    6 +++---
>  lib/srdb1/db_val.c |   42 +++++++++++++++++++++---------------------
>  lib/srdb1/db_val.h |   16 ++++++++--------
>  4 files changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
> index c705aea..49f08a8 100644
> --- a/lib/srdb1/db.c
> +++ b/lib/srdb1/db.c
> @@ -356,7 +356,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
>  	str tmp1 = str_init(TABLENAME_COLUMN);
>  	key[0] = &tmp1;
>  
> -	VAL_TYPE(val) = DB_STR;
> +	VAL_TYPE(val) = DB1_STR;
>  	VAL_NULL(val) = 0;
>  	VAL_STR(val) = *table;
>  	
> @@ -382,7 +382,7 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
>  	}
>  
>  	ver = ROW_VALUES(RES_ROWS(res));
> -	if ( VAL_TYPE(ver)!=DB_INT || VAL_NULL(ver) ) {
> +	if ( VAL_TYPE(ver)!=DB1_INT || VAL_NULL(ver) ) {
>  		LM_ERR("invalid type (%d) or nul (%d) version "
>  			"columns for %.*s\n", VAL_TYPE(ver), VAL_NULL(ver),
>  			table->len, ZSW(table->s));
> diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
> index 449f3fd..83aca8f 100644
> --- a/lib/srdb1/db_row.c
> +++ b/lib/srdb1/db_row.c
> @@ -61,7 +61,7 @@ inline int db_free_row(db_row_t* _r)
>  	for (col = 0; col < ROW_N(_r); col++) {
>  		_val = &(ROW_VALUES(_r)[col]);
>  		switch (VAL_TYPE(_val)) {
> -			case DB_STRING:
> +			case DB1_STRING:
>  				if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
>  					LM_DBG("free VAL_STRING[%d] '%s' at %p\n", col,
>  							(char *)VAL_STRING(_val),
> @@ -70,7 +70,7 @@ inline int db_free_row(db_row_t* _r)
>  					VAL_STRING(_val) = NULL;
>  				}
>  				break;
> -			case DB_STR:
> +			case DB1_STR:
>  				if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
>  					LM_DBG("free VAL_STR[%d] '%.*s' at %p\n", col,
>  							VAL_STR(_val).len,
> @@ -79,7 +79,7 @@ inline int db_free_row(db_row_t* _r)
>  					VAL_STR(_val).s = NULL;
>  				}
>  				break;
> -			case DB_BLOB:
> +			case DB1_BLOB:
>  				if ( (!VAL_NULL(_val)) && VAL_FREE(_val)) {
>  					LM_DBG("free VAL_BLOB[%d] at %p\n", col, VAL_BLOB(_val).s);
>  					pkg_free(VAL_BLOB(_val).s);
> diff --git a/lib/srdb1/db_val.c b/lib/srdb1/db_val.c
> index 2d6ebc9..88a7a4f 100644
> --- a/lib/srdb1/db_val.c
> +++ b/lib/srdb1/db_val.c
> @@ -69,51 +69,51 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>  	VAL_NULL(_v) = 0;
>  
>  	switch(_t) {
> -	case DB_INT:
> +	case DB1_INT:
>  		LM_DBG("converting INT [%s]\n", _s);
>  		if (db_str2int(_s, &VAL_INT(_v)) < 0) {
>  			LM_ERR("error while converting integer value from string\n");
>  			return -2;
>  		} else {
> -			VAL_TYPE(_v) = DB_INT;
> +			VAL_TYPE(_v) = DB1_INT;
>  			return 0;
>  		}
>  		break;
>  
> -	case DB_BIGINT:
> +	case DB1_BIGINT:
>  		LM_DBG("converting BIGINT [%s]\n", _s);
>  		if (db_str2longlong(_s, &VAL_BIGINT(_v)) < 0) {
>  			LM_ERR("error while converting big integer value from string\n");
>  			return -3;
>  		} else {
> -			VAL_TYPE(_v) = DB_BIGINT;
> +			VAL_TYPE(_v) = DB1_BIGINT;
>  			return 0;
>  		}
>  		break;
>  
> -	case DB_BITMAP:
> +	case DB1_BITMAP:
>  		LM_DBG("converting BITMAP [%s]\n", _s);
>  		if (db_str2int(_s, &VAL_INT(_v)) < 0) {
>  			LM_ERR("error while converting bitmap value from string\n");
>  			return -4;
>  		} else {
> -			VAL_TYPE(_v) = DB_BITMAP;
> +			VAL_TYPE(_v) = DB1_BITMAP;
>  			return 0;
>  		}
>  		break;
>  	
> -	case DB_DOUBLE:
> +	case DB1_DOUBLE:
>  		LM_DBG("converting DOUBLE [%s]\n", _s);
>  		if (db_str2double(_s, &VAL_DOUBLE(_v)) < 0) {
>  			LM_ERR("error while converting double value from string\n");
>  			return -5;
>  		} else {
> -			VAL_TYPE(_v) = DB_DOUBLE;
> +			VAL_TYPE(_v) = DB1_DOUBLE;
>  			return 0;
>  		}
>  		break;
>  
> -	case DB_STRING:
> +	case DB1_STRING:
>  		LM_DBG("converting STRING [%s]\n", _s);
>  
>  		if (_cpy == 0) {
> @@ -130,10 +130,10 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>  			VAL_FREE(_v) = 1;
>  		}
>  
> -		VAL_TYPE(_v) = DB_STRING;
> +		VAL_TYPE(_v) = DB1_STRING;
>  		return 0;
>  
> -	case DB_STR:
> +	case DB1_STR:
>  		LM_DBG("converting STR [%.*s]\n", _l, _s);
>  
>  		if (_cpy == 0) {
> @@ -150,21 +150,21 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>  		}
>  
>  		VAL_STR(_v).len = _l;
> -		VAL_TYPE(_v) = DB_STR;
> +		VAL_TYPE(_v) = DB1_STR;
>  		return 0;
>  
> -	case DB_DATETIME:
> +	case DB1_DATETIME:
>  		LM_DBG("converting DATETIME [%s]\n", _s);
>  		if (db_str2time(_s, &VAL_TIME(_v)) < 0) {
>  			LM_ERR("error while converting datetime value from string\n");
>  			return -8;
>  		} else {
> -			VAL_TYPE(_v) = DB_DATETIME;
> +			VAL_TYPE(_v) = DB1_DATETIME;
>  			return 0;
>  		}
>  		break;
>  
> -	case DB_BLOB:
> +	case DB1_BLOB:
>  		LM_DBG("converting BLOB [%.*s]\n", _l, _s);
>  
>  		if (_cpy == 0) {
> @@ -181,7 +181,7 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>  		}
>  
>  		VAL_BLOB(_v).len = _l;
> -		VAL_TYPE(_v) = DB_BLOB;
> +		VAL_TYPE(_v) = DB1_BLOB;
>  		return 0;
>  	}
>  	return -10;
> @@ -216,7 +216,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  	}
>  	
>  	switch(VAL_TYPE(_v)) {
> -	case DB_INT:
> +	case DB1_INT:
>  		if (db_int2str(VAL_INT(_v), _s, _len) < 0) {
>  			LM_ERR("error while converting string to int\n");
>  			return -2;
> @@ -225,7 +225,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  		}
>  		break;
>  
> -	case DB_BIGINT:
> +	case DB1_BIGINT:
>  		if (db_longlong2str(VAL_BIGINT(_v), _s, _len) < 0) {
>  			LM_ERR("error while converting string to big int\n");
>  			return -3;
> @@ -234,7 +234,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  		}
>  		break;
>  
> -	case DB_BITMAP:
> +	case DB1_BITMAP:
>  		if (db_int2str(VAL_BITMAP(_v), _s, _len) < 0) {
>  			LM_ERR("error while converting string to int\n");
>  			return -4;
> @@ -243,7 +243,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  		}
>  		break;
>  
> -	case DB_DOUBLE:
> +	case DB1_DOUBLE:
>  		if (db_double2str(VAL_DOUBLE(_v), _s, _len) < 0) {
>  			LM_ERR("error while converting string to double\n");
>  			return -5;
> @@ -252,7 +252,7 @@ int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len)
>  		}
>  		break;
>  
> -	case DB_DATETIME:
> +	case DB1_DATETIME:
>  		if (db_time2str(VAL_TIME(_v), _s, _len) < 0) {
>  			LM_ERR("failed to convert string to time_t\n");
>  			return -8;
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index 3e56c0b..a8133c5 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -49,14 +49,14 @@
>   * API.
>   */
>  typedef enum {
> -	DB_INT,        /**< represents an 32 bit integer number      */
> -	DB_BIGINT,     /**< represents an 64 bit integer number      */
> -	DB_DOUBLE,     /**< represents a floating point number       */
> -	DB_STRING,     /**< represents a zero terminated const char* */
> -	DB_STR,        /**< represents a string of 'str' type        */
> -	DB_DATETIME,   /**< represents date and time                 */
> -	DB_BLOB,       /**< represents a large binary object         */
> -	DB_BITMAP      /**< an one-dimensional array of 32 flags     */
> +	DB1_INT,        /**< represents an 32 bit integer number      */
> +	DB1_BIGINT,     /**< represents an 64 bit integer number      */
> +	DB1_DOUBLE,     /**< represents a floating point number       */
> +	DB1_STRING,     /**< represents a zero terminated const char* */
> +	DB1_STR,        /**< represents a string of 'str' type        */
> +	DB1_DATETIME,   /**< represents date and time                 */
> +	DB1_BLOB,       /**< represents a large binary object         */
> +	DB1_BITMAP      /**< an one-dimensional array of 32 flags     */
>  } db_type_t;
>  
>  
> -- 
> 1.5.6.5
> 

> >From cb5aaf833539c231625e0d5474182a32b3ba3335 Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:22:10 +0100
> Subject: [PATCH] Renamed type names (DB_ -> DB1_) in comments and documentation.
> 
> ---
>  lib/srdb1/db_row.c |    2 +-
>  lib/srdb1/db_val.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
> index 83aca8f..ec1205c 100644
> --- a/lib/srdb1/db_row.c
> +++ b/lib/srdb1/db_row.c
> @@ -52,7 +52,7 @@ inline int db_free_row(db_row_t* _r)
>  	/*
>  	 * Loop thru each columm, then check to determine if the storage pointed to
>  	 * by db_val_t structure must be freed. This is required for all data types
> -	 * which use a pointer to a buffer like DB_STRING, DB_STR and DB_BLOB and
> +	 * which use a pointer to a buffer like DB1_STRING, DB1_STR and DB1_BLOB and
>  	 * the database module copied them during the assignment.
>  	 * If this is not done, a memory leak will happen.
>  	 * Don't try to free the static dummy string (as indicated from the NULL value),
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index a8133c5..be0c4a8 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -27,7 +27,7 @@
>   *
>   * This file defines data structures that represents values in the database.
>   * Several datatypes are recognized and converted by the database API.
> - * Available types: DB_INT, DB_DOUBLE, DB_STRING, DB_STR, DB_DATETIME, DB_BLOB and DB_BITMAP
> + * Available types: DB1_INT, DB1_DOUBLE, DB1_STRING, DB1_STR, DB1_DATETIME, DB1_BLOB and DB1_BITMAP
>   * It also provides some macros for convenient access to this values,
>   * and a function to convert a str to a value.
>   * \ingroup db
> -- 
> 1.5.6.5
> 

> >From 7d14b0374cd9b84b4114bbb4f75ea0ca85801587 Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:23:12 +0100
> Subject: [PATCH] Updated the value of \file doxygen tags.
> 
> Since we moved files in lib/srdb1 from another directory we also needed
> to update the doxygen \file tags.
> ---
>  lib/srdb1/db.c       |    2 +-
>  lib/srdb1/db.h       |    2 +-
>  lib/srdb1/db_cap.h   |    2 +-
>  lib/srdb1/db_con.h   |    2 +-
>  lib/srdb1/db_id.c    |    2 +-
>  lib/srdb1/db_id.h    |    2 +-
>  lib/srdb1/db_key.h   |    2 +-
>  lib/srdb1/db_op.h    |    2 +-
>  lib/srdb1/db_pool.c  |    2 +-
>  lib/srdb1/db_pool.h  |    2 +-
>  lib/srdb1/db_query.c |    2 +-
>  lib/srdb1/db_query.h |    2 +-
>  lib/srdb1/db_res.c   |    2 +-
>  lib/srdb1/db_res.h   |    2 +-
>  lib/srdb1/db_row.c   |    2 +-
>  lib/srdb1/db_row.h   |    2 +-
>  lib/srdb1/db_ut.c    |    2 +-
>  lib/srdb1/db_ut.h    |    2 +-
>  lib/srdb1/db_val.h   |    2 +-
>  19 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
> index 49f08a8..7a39390 100644
> --- a/lib/srdb1/db.c
> +++ b/lib/srdb1/db.c
> @@ -28,7 +28,7 @@
>    */
>  
>  /**
> - * \file db/db.c
> + * \file lib/srdb1/db.c
>   * \ingroup db
>   * \brief Generic Database Interface
>   *
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 5b2c0e8..89677f7 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db.h
> + * \file lib/srdb1/db.h
>   * \ingroup db
>   * \ref db.c
>   * \brief Generic Database Interface
> diff --git a/lib/srdb1/db_cap.h b/lib/srdb1/db_cap.h
> index a196f54..b2b74eb 100644
> --- a/lib/srdb1/db_cap.h
> +++ b/lib/srdb1/db_cap.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /*!
> - * \file db_cap.h
> + * \file lib/srdb1/db_cap.h
>   * \ingroup db
>   * \brief Data structures that represents capabilities in the database.
>   *
> diff --git a/lib/srdb1/db_con.h b/lib/srdb1/db_con.h
> index 0cb6514..a280fba 100644
> --- a/lib/srdb1/db_con.h
> +++ b/lib/srdb1/db_con.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /*!
> - * \file db/db_con.h
> + * \file lib/srdb1/db_con.h
>   * \ingroup db
>   * \brief Type that represents a database connection
>   */
> diff --git a/lib/srdb1/db_id.c b/lib/srdb1/db_id.c
> index 46ae821..3ef7cad 100644
> --- a/lib/srdb1/db_id.c
> +++ b/lib/srdb1/db_id.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_id.c
> + * \file lib/srdb1/db_id.c
>   * \ingroup db
>   * \brief Functions for parsing a database URL and work with db identifier.
>   */
> diff --git a/lib/srdb1/db_id.h b/lib/srdb1/db_id.h
> index 641417d..b465fcd 100644
> --- a/lib/srdb1/db_id.h
> +++ b/lib/srdb1/db_id.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /*!
> - * \file db/db_id.h
> + * \file lib/srdb1/db_id.h
>   * \ingroup db
>   * \brief Functions for parsing a database URL and works with db identifier.
>   */
> diff --git a/lib/srdb1/db_key.h b/lib/srdb1/db_key.h
> index 50fd8aa..cab6a7b 100644
> --- a/lib/srdb1/db_key.h
> +++ b/lib/srdb1/db_key.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_key.h
> + * \file lib/srdb1/db_key.h
>   * \ingroup db
>   * \brief Type that represents a database key.
>   */
> diff --git a/lib/srdb1/db_op.h b/lib/srdb1/db_op.h
> index 2b23a62..ecb9f90 100644
> --- a/lib/srdb1/db_op.h
> +++ b/lib/srdb1/db_op.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_op.h
> + * \file lib/srdb1/db_op.h
>   * \brief Type that represents a expression operator.
>   * \ingroup db
>   */
> diff --git a/lib/srdb1/db_pool.c b/lib/srdb1/db_pool.c
> index 6a1a9fc..feb5a54 100644
> --- a/lib/srdb1/db_pool.c
> +++ b/lib/srdb1/db_pool.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_pool.c
> + * \file lib/srdb1/db_pool.c
>   * \brief Functions for managing a pool of database connections.
>   * \ingroup db
>   */
> diff --git a/lib/srdb1/db_pool.h b/lib/srdb1/db_pool.h
> index 7f5dc50..c3cbdd4 100644
> --- a/lib/srdb1/db_pool.h
> +++ b/lib/srdb1/db_pool.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_pool.h
> + * \file lib/srdb1/db_pool.h
>   * \brief Functions for managing a pool of database connections.
>   * \ingroup db
>   */
> diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
> index 2d24974..793bb52 100644
> --- a/lib/srdb1/db_query.c
> +++ b/lib/srdb1/db_query.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_query.c
> + * \file lib/srdb1/db_query.c
>   * \brief Query helper for database drivers
>   * \ingroup db
>   *
> diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
> index 9cbc224..0e2ef0e 100644
> --- a/lib/srdb1/db_query.h
> +++ b/lib/srdb1/db_query.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_query.h
> + * \file lib/srdb1/db_query.h
>   * \brief Query helper for database drivers
>   * \ingroup db
>   *
> diff --git a/lib/srdb1/db_res.c b/lib/srdb1/db_res.c
> index 16685a8..38f2954 100644
> --- a/lib/srdb1/db_res.c
> +++ b/lib/srdb1/db_res.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_res.c
> + * \file lib/srdb1/db_res.c
>   * \brief Functions to manage result structures
>   * \ingroup db
>   *
> diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
> index aeab717..17a228f 100644
> --- a/lib/srdb1/db_res.h
> +++ b/lib/srdb1/db_res.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_res.h
> + * \file lib/srdb1/db_res.h
>   * \brief Data structure that represents a result from a query.
>   *
>   * Data structure that represents a result from a database query,
> diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
> index ec1205c..cd14cfc 100644
> --- a/lib/srdb1/db_row.c
> +++ b/lib/srdb1/db_row.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_row.c
> + * \file lib/srdb1/db_row.c
>   * \brief Type that represents a row in a database.
>   *
>   * This file holds a type that represents a row in a database, some convenience
> diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h
> index 81a53e6..8fc890c 100644
> --- a/lib/srdb1/db_row.h
> +++ b/lib/srdb1/db_row.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_row.h
> + * \file lib/srdb1/db_row.h
>   * \brief Type that represents a row in a database.
>   *
>   * This file holds a type that represents a row in a database, some convenience
> diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
> index 2d65e19..2a6bfa4 100644
> --- a/lib/srdb1/db_ut.c
> +++ b/lib/srdb1/db_ut.c
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_ut.c
> + * \file lib/srdb1/db_ut.c
>   * \brief Utility functions for database drivers.
>   *
>   * This utility methods are used from the database SQL driver to convert
> diff --git a/lib/srdb1/db_ut.h b/lib/srdb1/db_ut.h
> index f821a09..f2353fa 100644
> --- a/lib/srdb1/db_ut.h
> +++ b/lib/srdb1/db_ut.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_ut.h
> + * \file lib/srdb1/db_ut.h
>   * \brief Utility functions for database drivers.
>   *
>   * This utility methods are used from the database SQL driver to convert
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index be0c4a8..e1329b8 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -22,7 +22,7 @@
>   */
>  
>  /**
> - * \file db/db_val.h
> + * \file lib/srdb1/db_val.h
>   * \brief Data structures that represents values in the database.
>   *
>   * This file defines data structures that represents values in the database.
> -- 
> 1.5.6.5
> 

> >From a33b9a87f67d035c727520bd8cf8eac3937cc5a9 Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:23:56 +0100
> Subject: [PATCH] Doxygen group renamed from db to db1.
> 
> ---
>  lib/srdb1/db.c       |    2 +-
>  lib/srdb1/db.h       |    2 +-
>  lib/srdb1/db_cap.h   |    2 +-
>  lib/srdb1/db_con.h   |    2 +-
>  lib/srdb1/db_id.c    |    2 +-
>  lib/srdb1/db_id.h    |    2 +-
>  lib/srdb1/db_key.h   |    2 +-
>  lib/srdb1/db_op.h    |    2 +-
>  lib/srdb1/db_pool.c  |    2 +-
>  lib/srdb1/db_pool.h  |    2 +-
>  lib/srdb1/db_query.c |    2 +-
>  lib/srdb1/db_query.h |    2 +-
>  lib/srdb1/db_res.c   |    2 +-
>  lib/srdb1/db_res.h   |    2 +-
>  lib/srdb1/db_row.c   |    2 +-
>  lib/srdb1/db_row.h   |    2 +-
>  lib/srdb1/db_ut.c    |    2 +-
>  lib/srdb1/db_ut.h    |    2 +-
>  lib/srdb1/db_val.h   |    2 +-
>  19 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/lib/srdb1/db.c b/lib/srdb1/db.c
> index 7a39390..0cc7eeb 100644
> --- a/lib/srdb1/db.c
> +++ b/lib/srdb1/db.c
> @@ -29,7 +29,7 @@
>  
>  /**
>   * \file lib/srdb1/db.c
> - * \ingroup db
> + * \ingroup db1
>   * \brief Generic Database Interface
>   *
>   */
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 89677f7..6c088c4 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -23,7 +23,7 @@
>  
>  /**
>   * \file lib/srdb1/db.h
> - * \ingroup db
> + * \ingroup db1
>   * \ref db.c
>   * \brief Generic Database Interface
>   *
> diff --git a/lib/srdb1/db_cap.h b/lib/srdb1/db_cap.h
> index b2b74eb..11160ca 100644
> --- a/lib/srdb1/db_cap.h
> +++ b/lib/srdb1/db_cap.h
> @@ -23,7 +23,7 @@
>  
>  /*!
>   * \file lib/srdb1/db_cap.h
> - * \ingroup db
> + * \ingroup db1
>   * \brief Data structures that represents capabilities in the database.
>   *
>   * This file defines data structures that represents certain database
> diff --git a/lib/srdb1/db_con.h b/lib/srdb1/db_con.h
> index a280fba..0765eee 100644
> --- a/lib/srdb1/db_con.h
> +++ b/lib/srdb1/db_con.h
> @@ -23,7 +23,7 @@
>  
>  /*!
>   * \file lib/srdb1/db_con.h
> - * \ingroup db
> + * \ingroup db1
>   * \brief Type that represents a database connection
>   */
>  
> diff --git a/lib/srdb1/db_id.c b/lib/srdb1/db_id.c
> index 3ef7cad..d55c586 100644
> --- a/lib/srdb1/db_id.c
> +++ b/lib/srdb1/db_id.c
> @@ -23,7 +23,7 @@
>  
>  /**
>   * \file lib/srdb1/db_id.c
> - * \ingroup db
> + * \ingroup db1
>   * \brief Functions for parsing a database URL and work with db identifier.
>   */
>  
> diff --git a/lib/srdb1/db_id.h b/lib/srdb1/db_id.h
> index b465fcd..018f7df 100644
> --- a/lib/srdb1/db_id.h
> +++ b/lib/srdb1/db_id.h
> @@ -23,7 +23,7 @@
>  
>  /*!
>   * \file lib/srdb1/db_id.h
> - * \ingroup db
> + * \ingroup db1
>   * \brief Functions for parsing a database URL and works with db identifier.
>   */
>  
> diff --git a/lib/srdb1/db_key.h b/lib/srdb1/db_key.h
> index cab6a7b..40df120 100644
> --- a/lib/srdb1/db_key.h
> +++ b/lib/srdb1/db_key.h
> @@ -23,7 +23,7 @@
>  
>  /**
>   * \file lib/srdb1/db_key.h
> - * \ingroup db
> + * \ingroup db1
>   * \brief Type that represents a database key.
>   */
>  
> diff --git a/lib/srdb1/db_op.h b/lib/srdb1/db_op.h
> index ecb9f90..0b5eb4f 100644
> --- a/lib/srdb1/db_op.h
> +++ b/lib/srdb1/db_op.h
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_op.h
>   * \brief Type that represents a expression operator.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #ifndef DB_OP_H
> diff --git a/lib/srdb1/db_pool.c b/lib/srdb1/db_pool.c
> index feb5a54..80f126a 100644
> --- a/lib/srdb1/db_pool.c
> +++ b/lib/srdb1/db_pool.c
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_pool.c
>   * \brief Functions for managing a pool of database connections.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #include "../../dprint.h"
> diff --git a/lib/srdb1/db_pool.h b/lib/srdb1/db_pool.h
> index c3cbdd4..c569a1e 100644
> --- a/lib/srdb1/db_pool.h
> +++ b/lib/srdb1/db_pool.h
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_pool.h
>   * \brief Functions for managing a pool of database connections.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #ifndef _DB_POOL_H
> diff --git a/lib/srdb1/db_query.c b/lib/srdb1/db_query.c
> index 793bb52..aa25cd5 100644
> --- a/lib/srdb1/db_query.c
> +++ b/lib/srdb1/db_query.c
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_query.c
>   * \brief Query helper for database drivers
> - * \ingroup db
> + * \ingroup db1
>   *
>   * This helper methods for database queries are used from the database
>   * SQL driver to do the actual work. Each function uses some functions from
> diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
> index 0e2ef0e..0dd83b2 100644
> --- a/lib/srdb1/db_query.h
> +++ b/lib/srdb1/db_query.h
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_query.h
>   * \brief Query helper for database drivers
> - * \ingroup db
> + * \ingroup db1
>   *
>   * This helper methods for database queries are used from the database
>   * SQL driver to do the actual work. Each function uses some functions from
> diff --git a/lib/srdb1/db_res.c b/lib/srdb1/db_res.c
> index 38f2954..3581021 100644
> --- a/lib/srdb1/db_res.c
> +++ b/lib/srdb1/db_res.c
> @@ -24,7 +24,7 @@
>  /**
>   * \file lib/srdb1/db_res.c
>   * \brief Functions to manage result structures
> - * \ingroup db
> + * \ingroup db1
>   *
>   * Provides some convenience macros and some memory management
>   * functions for result structures.
> diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
> index 17a228f..608026b 100644
> --- a/lib/srdb1/db_res.h
> +++ b/lib/srdb1/db_res.h
> @@ -28,7 +28,7 @@
>   * Data structure that represents a result from a database query,
>   * it also provides some convenience macros and some memory management
>   * functions for result structures.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #ifndef DB_RES_H
> diff --git a/lib/srdb1/db_row.c b/lib/srdb1/db_row.c
> index cd14cfc..f832411 100644
> --- a/lib/srdb1/db_row.c
> +++ b/lib/srdb1/db_row.c
> @@ -27,7 +27,7 @@
>   *
>   * This file holds a type that represents a row in a database, some convenience
>   * macros and a function for memory managements.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #include "db_row.h"
> diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h
> index 8fc890c..c411775 100644
> --- a/lib/srdb1/db_row.h
> +++ b/lib/srdb1/db_row.h
> @@ -27,7 +27,7 @@
>   *
>   * This file holds a type that represents a row in a database, some convenience
>   * macros and a function for memory managements.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  
> diff --git a/lib/srdb1/db_ut.c b/lib/srdb1/db_ut.c
> index 2a6bfa4..498ad7f 100644
> --- a/lib/srdb1/db_ut.c
> +++ b/lib/srdb1/db_ut.c
> @@ -27,7 +27,7 @@
>   *
>   * This utility methods are used from the database SQL driver to convert
>   * values and print SQL queries from the internal API representation.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  #include "db_ut.h"
> diff --git a/lib/srdb1/db_ut.h b/lib/srdb1/db_ut.h
> index f2353fa..3ca6bbe 100644
> --- a/lib/srdb1/db_ut.h
> +++ b/lib/srdb1/db_ut.h
> @@ -27,7 +27,7 @@
>   *
>   * This utility methods are used from the database SQL driver to convert
>   * values and print SQL queries from the internal API representation.
> - * \ingroup db
> + * \ingroup db1
>  */
>  
>  #ifndef DB_UT_H
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index e1329b8..a523033 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -30,7 +30,7 @@
>   * Available types: DB1_INT, DB1_DOUBLE, DB1_STRING, DB1_STR, DB1_DATETIME, DB1_BLOB and DB1_BITMAP
>   * It also provides some macros for convenient access to this values,
>   * and a function to convert a str to a value.
> - * \ingroup db
> + * \ingroup db1
>   */
>  
>  
> -- 
> 1.5.6.5
> 

> >From 2d6bfb46145eb354f0ed22301a8fdeef67eacf2e Mon Sep 17 00:00:00 2001
> From: Jan Janak <jan at iptel.org>
> Date: Thu, 12 Feb 2009 20:28:11 +0100
> Subject: [PATCH] Header file conditional macros renamed (DB_ -> DB1).
> 
> All macros protecting header files against multiple inclusions have been
> renamed to make sure that there are no conflicts with header fields from srdb2
> library.
> ---
>  lib/srdb1/db.h       |    6 +++---
>  lib/srdb1/db_cap.h   |    6 +++---
>  lib/srdb1/db_con.h   |    6 +++---
>  lib/srdb1/db_id.h    |    6 +++---
>  lib/srdb1/db_key.h   |    6 +++---
>  lib/srdb1/db_op.h    |    6 +++---
>  lib/srdb1/db_pool.h  |    6 +++---
>  lib/srdb1/db_query.h |    4 ++--
>  lib/srdb1/db_res.h   |    6 +++---
>  lib/srdb1/db_row.h   |    6 +++---
>  lib/srdb1/db_ut.h    |    4 ++--
>  lib/srdb1/db_val.h   |    6 +++---
>  12 files changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/lib/srdb1/db.h b/lib/srdb1/db.h
> index 6c088c4..0429e2c 100644
> --- a/lib/srdb1/db.h
> +++ b/lib/srdb1/db.h
> @@ -39,8 +39,8 @@
>   * take a look at the sources of the usrloc or auth modules.
>   */
>  
> -#ifndef DB_H
> -#define DB_H
> +#ifndef DB1_H
> +#define DB1_H
>  
>  #include "db_key.h"
>  #include "db_op.h"
> @@ -399,4 +399,4 @@ int db_use_table(db1_con_t* _h, const str* _t);
>  typedef int (*db_bind_api_f)(db_func_t *dbb);
>  
>  
> -#endif /* DB_H */
> +#endif /* DB1_H */
> diff --git a/lib/srdb1/db_cap.h b/lib/srdb1/db_cap.h
> index 11160ca..e87ef66 100644
> --- a/lib/srdb1/db_cap.h
> +++ b/lib/srdb1/db_cap.h
> @@ -31,8 +31,8 @@
>   * values.
>   */
>  
> -#ifndef DB_CAP_H
> -#define DB_CAP_H
> +#ifndef DB1_CAP_H
> +#define DB1_CAP_H
>  
>  
>  /*! \brief
> @@ -66,4 +66,4 @@ typedef enum db_cap {
>  #define DB_CAPABILITY(dbf, cpv) (((dbf).cap & (cpv)) == (cpv))
>  
>  
> -#endif /* DB_CAP_H */
> +#endif /* DB1_CAP_H */
> diff --git a/lib/srdb1/db_con.h b/lib/srdb1/db_con.h
> index 0765eee..3660d29 100644
> --- a/lib/srdb1/db_con.h
> +++ b/lib/srdb1/db_con.h
> @@ -27,8 +27,8 @@
>   * \brief Type that represents a database connection
>   */
>  
> -#ifndef DB_CON_H
> -#define DB_CON_H
> +#ifndef DB1_CON_H
> +#define DB1_CON_H
>  
>  #include "../../str.h"
>  
> @@ -49,4 +49,4 @@ typedef struct {
>  #define CON_TAIL(cn)       ((cn)->tail)
>  
>  
> -#endif /* DB_CON_H */
> +#endif /* DB1_CON_H */
> diff --git a/lib/srdb1/db_id.h b/lib/srdb1/db_id.h
> index 018f7df..025855f 100644
> --- a/lib/srdb1/db_id.h
> +++ b/lib/srdb1/db_id.h
> @@ -27,8 +27,8 @@
>   * \brief Functions for parsing a database URL and works with db identifier.
>   */
>  
> -#ifndef _DB_ID_H
> -#define _DB_ID_H
> +#ifndef _DB1_ID_H
> +#define _DB1_ID_H
>  
>  #include "../../str.h"
>  
> @@ -67,4 +67,4 @@ unsigned char cmp_db_id(const struct db_id* id1, const struct db_id* id2);
>  void free_db_id(struct db_id* id);
>  
>  
> -#endif /* _DB_ID_H */
> +#endif /* _DB1_ID_H */
> diff --git a/lib/srdb1/db_key.h b/lib/srdb1/db_key.h
> index 40df120..c55a812 100644
> --- a/lib/srdb1/db_key.h
> +++ b/lib/srdb1/db_key.h
> @@ -27,8 +27,8 @@
>   * \brief Type that represents a database key.
>   */
>  
> -#ifndef DB_KEY_H
> -#define DB_KEY_H
> +#ifndef DB1_KEY_H
> +#define DB1_KEY_H
>  
>  #include "../../ut.h"
>  
> @@ -40,4 +40,4 @@
>  typedef str* db_key_t;
>  
>  
> -#endif /* DB_KEY_H */
> +#endif /* DB1_KEY_H */
> diff --git a/lib/srdb1/db_op.h b/lib/srdb1/db_op.h
> index 0b5eb4f..10ee44a 100644
> --- a/lib/srdb1/db_op.h
> +++ b/lib/srdb1/db_op.h
> @@ -27,8 +27,8 @@
>   * \ingroup db1
>   */
>  
> -#ifndef DB_OP_H
> -#define DB_OP_H
> +#ifndef DB1_OP_H
> +#define DB1_OP_H
>  
>  /** operator less than */
>  #define OP_LT  "<"
> @@ -50,4 +50,4 @@
>  typedef const char* db_op_t;
>  
>  
> -#endif /* DB_OP_H */
> +#endif /* DB1_OP_H */
> diff --git a/lib/srdb1/db_pool.h b/lib/srdb1/db_pool.h
> index c569a1e..d0a3982 100644
> --- a/lib/srdb1/db_pool.h
> +++ b/lib/srdb1/db_pool.h
> @@ -27,8 +27,8 @@
>   * \ingroup db1
>   */
>  
> -#ifndef _DB_POOL_H
> -#define _DB_POOL_H
> +#ifndef _DB1_POOL_H
> +#define _DB1_POOL_H
>  
>  #include "db_id.h"
>  #include "db_con.h"
> @@ -80,4 +80,4 @@ void pool_insert(struct pool_con* con);
>  int pool_remove(struct pool_con* con);
>  
>  
> -#endif /* _POOL_H */
> +#endif /* _DB1_POOL_H */
> diff --git a/lib/srdb1/db_query.h b/lib/srdb1/db_query.h
> index 0dd83b2..41e0fd8 100644
> --- a/lib/srdb1/db_query.h
> +++ b/lib/srdb1/db_query.h
> @@ -32,8 +32,8 @@
>   * implementation.
>  */
>  
> -#ifndef DB_QUERY_H
> -#define DB_QUERY_H
> +#ifndef DB1_QUERY_H
> +#define DB1_QUERY_H
>  
>  #include "db_key.h"
>  #include "db_op.h"
> diff --git a/lib/srdb1/db_res.h b/lib/srdb1/db_res.h
> index 608026b..82734b3 100644
> --- a/lib/srdb1/db_res.h
> +++ b/lib/srdb1/db_res.h
> @@ -31,8 +31,8 @@
>   * \ingroup db1
>   */
>  
> -#ifndef DB_RES_H
> -#define DB_RES_H
> +#ifndef DB1_RES_H
> +#define DB1_RES_H
>  
>  
>  #include "db_key.h"
> @@ -128,4 +128,4 @@ inline int db_allocate_columns(db1_res_t* _r, const unsigned int cols);
>   */
>  inline int db_allocate_rows(db1_res_t* _res);
>  
> -#endif /* DB_RES_H */
> +#endif /* DB1_RES_H */
> diff --git a/lib/srdb1/db_row.h b/lib/srdb1/db_row.h
> index c411775..855ed3d 100644
> --- a/lib/srdb1/db_row.h
> +++ b/lib/srdb1/db_row.h
> @@ -31,8 +31,8 @@
>   */
>  
>  
> -#ifndef DB_ROW_H
> -#define DB_ROW_H
> +#ifndef DB1_ROW_H
> +#define DB1_ROW_H
>  
>  #include "db_val.h"
>  #include "db_res.h"
> @@ -73,4 +73,4 @@ inline int db_free_row(db_row_t* _r);
>   */
>  inline int db_allocate_row(const db1_res_t* _res, db_row_t* _row);
>  
> -#endif /* DB_ROW_H */
> +#endif /* DB1_ROW_H */
> diff --git a/lib/srdb1/db_ut.h b/lib/srdb1/db_ut.h
> index 3ca6bbe..050a75b 100644
> --- a/lib/srdb1/db_ut.h
> +++ b/lib/srdb1/db_ut.h
> @@ -30,8 +30,8 @@
>   * \ingroup db1
>  */
>  
> -#ifndef DB_UT_H
> -#define DB_UT_H
> +#ifndef DB1_UT_H
> +#define DB1_UT_H
>  
>  /**
>   * maximal SQL buffer length for database drivers
> diff --git a/lib/srdb1/db_val.h b/lib/srdb1/db_val.h
> index a523033..2e5b166 100644
> --- a/lib/srdb1/db_val.h
> +++ b/lib/srdb1/db_val.h
> @@ -34,8 +34,8 @@
>   */
>  
>  
> -#ifndef DB_VAL_H
> -#define DB_VAL_H
> +#ifndef DB1_VAL_H
> +#define DB1_VAL_H
>  
>  #include "db_con.h"
>  #include <time.h>
> @@ -195,4 +195,4 @@ int db_str2val(const db_type_t _t, db_val_t* _v, const char* _s, const int _l,
>   */
>  int db_val2str(const db1_con_t* _c, const db_val_t* _v, char* _s, int* _len);
>  
> -#endif /* DB_VAL_H */
> +#endif /* DB1_VAL_H */
> -- 
> 1.5.6.5
> 

> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev




More information about the sr-dev mailing list