Module: sip-router
Branch: janakj/mysql
Commit: d4a0c89c75e8729d8185c93bb994f85cf0999646
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d4a0c89…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Tue Feb 17 10:49:06 2009 +0100
Export db_bind_api through the module interface.
---
modules/db_mysql/km_db_mysql.c | 3 ---
modules/db_mysql/km_db_mysql.h | 4 ++++
modules/db_mysql/mysql_mod.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/db_mysql/km_db_mysql.c b/modules/db_mysql/km_db_mysql.c
index efa5d88..eb17726 100644
--- a/modules/db_mysql/km_db_mysql.c
+++ b/modules/db_mysql/km_db_mysql.c
@@ -42,7 +42,6 @@
*/
#include "../../sr_module.h"
-#include "../../lib/srdb1/db.h"
#include "km_dbase.h"
#include "km_db_mysql.h"
@@ -56,8 +55,6 @@ static int mysql_mod_init(void);
/* MODULE_VERSION */
-int db_mysql_bind_api(db_func_t *dbb);
-
/*! \brief
* MySQL database module interface
*/
diff --git a/modules/db_mysql/km_db_mysql.h b/modules/db_mysql/km_db_mysql.h
index 8512fc2..fa6b698 100644
--- a/modules/db_mysql/km_db_mysql.h
+++ b/modules/db_mysql/km_db_mysql.h
@@ -38,8 +38,12 @@
#ifndef KM_DB_MOD_H
#define KM_DB_MOD_H
+#include "../../lib/srdb1/db.h"
+
extern unsigned int db_mysql_ping_interval;
extern unsigned int db_mysql_timeout_interval;
extern unsigned int db_mysql_auto_reconnect;
+int db_mysql_bind_api(db_func_t *dbb);
+
#endif /* KM_DB_MOD_H */
diff --git a/modules/db_mysql/mysql_mod.c b/modules/db_mysql/mysql_mod.c
index 469bfb6..bc9f3bb 100644
--- a/modules/db_mysql/mysql_mod.c
+++ b/modules/db_mysql/mysql_mod.c
@@ -32,12 +32,12 @@
* 2003-03-11 updated to the new module exports interface (andrei)
* 2003-03-16 flags export parameter added (janakj)
*/
-
/** @addtogroup mysql
* @{
*/
#include "mysql_mod.h"
+#include "km_db_mysql.h"
#include "my_uri.h"
#include "my_con.h"
@@ -83,6 +83,7 @@ static cmd_export_t cmds[] = {
{"db_next", (cmd_function)my_cmd_next, 0, 0, 0},
{"db_setopt", (cmd_function)my_setopt, 0, 0, 0},
{"db_getopt", (cmd_function)my_getopt, 0, 0, 0},
+ {"db_bind_api", (cmd_function)db_mysql_bind_api, 0, 0, 0},
{0, 0, 0, 0, 0}
};