[commit] r2797 - in freeswitch/branches/voctel/src/mod/applications: mod_conference mod_phonecard
Author: voctel Date: Sat Sep 23 01:32:10 2006 New Revision: 2797 Modified: freeswitch/branches/voctel/src/mod/applications/mod_conference/mod_conference.c freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.c freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.h Log: switch inital db type to postgresql Modified: freeswitch/branches/voctel/src/mod/applications/mod_conference/mod_conference.c ============================================================================== --- freeswitch/branches/voctel/src/mod/applications/mod_conference/mod_conference.c (original) +++ freeswitch/branches/voctel/src/mod/applications/mod_conference/mod_conference.c Sat Sep 23 01:32:10 2006 @@ -2933,8 +2933,6 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void) { - - if (globals.running) { globals.running = 0; while (globals.threads) { Modified: freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.c ============================================================================== --- freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.c (original) +++ freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.c Sat Sep 23 01:32:10 2006 @@ -33,18 +33,12 @@ #include <switch.h> #include <mod_phonecard.h> -//-- freeTDS includes (XXX: I know, I'll build PostgreSQL and MySQL later) -#include <tds.h> -#include <tdsconvert.h> -#include <ctype.h> +//-- PostgreSQL +#include <libpq-fe.h> -#ifdef FREETDS_PRE_0_63 -#warning "You have older version of FreeTDS, you *NEED* to upgrade!" -#endif - static const char modname[] = "mod_voctel"; static const char global_app_name[] = "phonecard"; -//static char *global_cf_name = "phonecard.conf"; +static char *global_cf_name = "phonecard.conf"; static char *db_hostname = NULL; static char *db_name = NULL; @@ -54,12 +48,13 @@ static char *db_table = NULL; static int db_port = 0; -static TDSSOCKET *tds; -static TDSLOGIN *login; -static TDSCONTEXT *context; - static int db_connected = 0; +/* PostgreSQL declarations */ +PGconn *DBConn; + +switch_mutex_t *db_lock; + //-- main application routine static void phonecard_main(switch_core_session_t *session, char *data) { @@ -94,7 +89,8 @@ /* connect my internal structure to the blank pointer passed to me */ *module_interface = &phonecard_module_interface; - //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Hello World!\n"); + + /* indicate that the module should continue to be loaded */ return SWITCH_STATUS_SUCCESS; Modified: freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.h ============================================================================== --- freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.h (original) +++ freeswitch/branches/voctel/src/mod/applications/mod_phonecard/mod_phonecard.h Sat Sep 23 01:32:10 2006 @@ -34,4 +34,7 @@ extern int mssql_connect(void); /*! \brief Function used to connect to MS SQL */ -extern int mssql_disconnect(void); \ No newline at end of file +extern int mssql_disconnect(void); + + +
participants (1)
-
Freeswitch SVN