Browse Source

Export db_bind_api through the module interface.

Jan Janak 16 years ago
parent
commit
d4a0c89c75

+ 0 - 3
modules/db_mysql/km_db_mysql.c

@@ -42,7 +42,6 @@
  */
  */
 
 
 #include "../../sr_module.h"
 #include "../../sr_module.h"
-#include "../../lib/srdb1/db.h"
 #include "km_dbase.h"
 #include "km_dbase.h"
 #include "km_db_mysql.h"
 #include "km_db_mysql.h"
 
 
@@ -56,8 +55,6 @@ static int mysql_mod_init(void);
 
 
 /* MODULE_VERSION */
 /* MODULE_VERSION */
 
 
-int db_mysql_bind_api(db_func_t *dbb);
-
 /*! \brief
 /*! \brief
  * MySQL database module interface
  * MySQL database module interface
  */
  */

+ 4 - 0
modules/db_mysql/km_db_mysql.h

@@ -38,8 +38,12 @@
 #ifndef KM_DB_MOD_H
 #ifndef KM_DB_MOD_H
 #define 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_ping_interval;
 extern unsigned int db_mysql_timeout_interval;
 extern unsigned int db_mysql_timeout_interval;
 extern unsigned int db_mysql_auto_reconnect;
 extern unsigned int db_mysql_auto_reconnect;
 
 
+int db_mysql_bind_api(db_func_t *dbb);
+
 #endif /* KM_DB_MOD_H */
 #endif /* KM_DB_MOD_H */

+ 2 - 1
modules/db_mysql/mysql_mod.c

@@ -32,12 +32,12 @@
  *  2003-03-11  updated to the new module exports interface (andrei)
  *  2003-03-11  updated to the new module exports interface (andrei)
  *  2003-03-16  flags export parameter added (janakj)
  *  2003-03-16  flags export parameter added (janakj)
  */
  */
-
 /** @addtogroup mysql
 /** @addtogroup mysql
  *  @{
  *  @{
  */
  */
  
  
 #include "mysql_mod.h"
 #include "mysql_mod.h"
+#include "km_db_mysql.h"
 
 
 #include "my_uri.h"
 #include "my_uri.h"
 #include "my_con.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_next",   (cmd_function)my_cmd_next,  0, 0, 0},
 	{"db_setopt", (cmd_function)my_setopt,    0, 0, 0},
 	{"db_setopt", (cmd_function)my_setopt,    0, 0, 0},
 	{"db_getopt", (cmd_function)my_getopt,    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}
 	{0, 0, 0, 0, 0}
 };
 };