Module: sip-router Branch: janakj/mysql Commit: f1fc20c7cbe36ae60b011dbb6b612632c7635ebb URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f1fc20c7...
Author: Jan Janak jan@iptel.org Committer: Jan Janak jan@iptel.org Date: Mon Feb 16 23:13:16 2009 +0100
db_res renamed to db1_res in files originating from kamailio/db_mysql.
The structure db_res has been renamed in lib/srdb1 to db1_res, thus we need to change the name of the structure in all files originating from kamailio/modules/db_mysql (and using lib/srdb1).
---
modules/db_mysql/km_dbase.c | 10 +++++----- modules/db_mysql/km_dbase.h | 8 ++++---- modules/db_mysql/km_res.c | 6 +++--- modules/db_mysql/km_res.h | 4 ++-- modules/db_mysql/km_row.c | 2 +- modules/db_mysql/km_row.h | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/modules/db_mysql/km_dbase.c b/modules/db_mysql/km_dbase.c index 2a2f9b8..6294a02 100644 --- a/modules/db_mysql/km_dbase.c +++ b/modules/db_mysql/km_dbase.c @@ -149,7 +149,7 @@ void db_mysql_close(db1_con_t* _h) * \param _r result set that should be retrieved * \return zero on success, negative value on failure */ -static int db_mysql_store_result(const db1_con_t* _h, db_res_t** _r) +static int db_mysql_store_result(const db1_con_t* _h, db1_res_t** _r) { if ((!_h) || (!_r)) { LM_ERR("invalid parameter value\n"); @@ -213,7 +213,7 @@ done: * \param _r result set that should be freed * \return zero on success, negative value on failure */ -int db_mysql_free_result(db1_con_t* _h, db_res_t* _r) +int db_mysql_free_result(db1_con_t* _h, db1_res_t* _r) { if ((!_h) || (!_r)) { LM_ERR("invalid parameter value\n"); @@ -245,7 +245,7 @@ int db_mysql_free_result(db1_con_t* _h, db_res_t* _r) */ int db_mysql_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) + const db_key_t _o, db1_res_t** _r) { return db_do_query(_h, _k, _op, _v, _c, _n, _nc, _o, _r, db_mysql_val2str, db_mysql_submit_query, db_mysql_store_result); @@ -266,7 +266,7 @@ int db_mysql_query(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _op, * \param nrows number of fetched rows * \return zero on success, negative value on failure */ -int db_mysql_fetch_result(const db1_con_t* _h, db_res_t** _r, const int nrows) +int db_mysql_fetch_result(const db1_con_t* _h, db1_res_t** _r, const int nrows) { int rows, i;
@@ -374,7 +374,7 @@ int db_mysql_fetch_result(const db1_con_t* _h, db_res_t** _r, const int nrows) * \param _r result set for storage * \return zero on success, negative value on failure */ -int db_mysql_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r) +int db_mysql_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r) { return db_do_raw_query(_h, _s, _r, db_mysql_submit_query, db_mysql_store_result); diff --git a/modules/db_mysql/km_dbase.h b/modules/db_mysql/km_dbase.h index 2a833e8..c1dec34 100644 --- a/modules/db_mysql/km_dbase.h +++ b/modules/db_mysql/km_dbase.h @@ -57,7 +57,7 @@ void db_mysql_close(db1_con_t* _h); /*! \brief * Free all memory allocated by get_result */ -int db_mysql_free_result(db1_con_t* _h, db_res_t* _r); +int db_mysql_free_result(db1_con_t* _h, db1_res_t* _r);
/*! \brief @@ -65,19 +65,19 @@ int db_mysql_free_result(db1_con_t* _h, db_res_t* _r); */ int db_mysql_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); + const db_key_t _o, db1_res_t** _r);
/*! \brief * fetch rows from a result */ -int db_mysql_fetch_result(const db1_con_t* _h, db_res_t** _r, const int nrows); +int db_mysql_fetch_result(const db1_con_t* _h, db1_res_t** _r, const int nrows);
/*! \brief * Raw SQL query */ -int db_mysql_raw_query(const db1_con_t* _h, const str* _s, db_res_t** _r); +int db_mysql_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r);
/*! \brief diff --git a/modules/db_mysql/km_res.c b/modules/db_mysql/km_res.c index 7367aa5..fe71cec 100644 --- a/modules/db_mysql/km_res.c +++ b/modules/db_mysql/km_res.c @@ -50,7 +50,7 @@ * \param _r database result set * \return 0 on success, negative on failure */ -int db_mysql_get_columns(const db1_con_t* _h, db_res_t* _r) +int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r) { int col; MYSQL_FIELD* fields; @@ -155,7 +155,7 @@ int db_mysql_get_columns(const db1_con_t* _h, db_res_t* _r) * \param _r database result set * \return 0 on success, negative on failure */ -static inline int db_mysql_convert_rows(const db1_con_t* _h, db_res_t* _r) +static inline int db_mysql_convert_rows(const db1_con_t* _h, db1_res_t* _r) { int row;
@@ -201,7 +201,7 @@ static inline int db_mysql_convert_rows(const db1_con_t* _h, db_res_t* _r) * \param _r database result * \return 0 on success, negative on failure */ -int db_mysql_convert_result(const db1_con_t* _h, db_res_t* _r) +int db_mysql_convert_result(const db1_con_t* _h, db1_res_t* _r) { if ((!_h) || (!_r)) { LM_ERR("invalid parameter\n"); diff --git a/modules/db_mysql/km_res.h b/modules/db_mysql/km_res.h index 6d2a18e..39b6d3d 100644 --- a/modules/db_mysql/km_res.h +++ b/modules/db_mysql/km_res.h @@ -44,7 +44,7 @@ * \param _r database result * \return 0 on success, negative on failure */ -int db_mysql_convert_result(const db1_con_t* _h, db_res_t* _r); +int db_mysql_convert_result(const db1_con_t* _h, db1_res_t* _r);
/*! @@ -53,6 +53,6 @@ int db_mysql_convert_result(const db1_con_t* _h, db_res_t* _r); * \param _r database result set * \return 0 on success, negative on failure */ -int db_mysql_get_columns(const db1_con_t* _h, db_res_t* _r); +int db_mysql_get_columns(const db1_con_t* _h, db1_res_t* _r);
#endif diff --git a/modules/db_mysql/km_row.c b/modules/db_mysql/km_row.c index b38854f..42f2841 100644 --- a/modules/db_mysql/km_row.c +++ b/modules/db_mysql/km_row.c @@ -44,7 +44,7 @@ * \param _r database result row * \return 0 on success, -1 on failure */ -int db_mysql_convert_row(const db1_con_t* _h, db_res_t* _res, db_row_t* _r) +int db_mysql_convert_row(const db1_con_t* _h, db1_res_t* _res, db_row_t* _r) { unsigned long* lengths; int i; diff --git a/modules/db_mysql/km_row.h b/modules/db_mysql/km_row.h index 35516f7..eb8b582 100644 --- a/modules/db_mysql/km_row.h +++ b/modules/db_mysql/km_row.h @@ -46,6 +46,6 @@ * \param _r database result row * \return 0 on success, -1 on failure */ -int db_mysql_convert_row(const db1_con_t* _h, db_res_t* _res, db_row_t* _r); +int db_mysql_convert_row(const db1_con_t* _h, db1_res_t* _res, db_row_t* _r);
#endif