hey guys,
i was having some problems with app_sql_mysql loading when i started
OPBX. in the past i was "solving" the problem by removing the module
from the modules directory. every time i started OPBX it would complain
about undefined symbols. out of curiosity, i decided to take it to the
IRC channel to see if anyone else was having problems. not many people
were really around at the time, but thanks to cursor, i have a couple of
patches that seem to fix the problem for me. the patches are attached.
Thanks,
Raymond "IntraLanMan" Chandler
Index: apps/app_sql_mysql.c
===================================================================
--- apps/app_sql_mysql.c (revision 2467)
+++ apps/app_sql_mysql.c (working copy)
@@ -376,7 +376,7 @@
static int MYSQL_exec(struct opbx_channel *chan, void *data)
{
- struct opbx_module_user *u;
+ struct localuser *u;
int result;
char sresult[10];
@@ -389,7 +389,7 @@
return -1;
}
- u = opbx_module_user_add(chan);
+ LOCAL_USER_ADD(u);
result=0;
opbx_mutex_lock(&_mysql_mutex);
@@ -411,7 +411,7 @@
opbx_mutex_unlock(&_mysql_mutex);
- opbx_module_user_remove(u);
+ LOCAL_USER_REMOVE(u);
snprintf(sresult, sizeof(sresult), "%d", result);
pbx_builtin_setvar_helper(chan, "MYSQL_STATUS", sresult);
return 0;
@@ -419,7 +419,7 @@
int unload_module(void)
{
- opbx_module_user_hangup_all();
+ STANDARD_HANGUP_LOCALUSERS;
return opbx_unregister_application(app);
}
Index: res/res_config_mysql.c
===================================================================
--- res/res_config_mysql.c (revision 2467)
+++ res/res_config_mysql.c (working copy)
@@ -503,7 +503,7 @@
opbx_verbose("MySQL RealTime unloaded.\n");
}
- opbx_module_user_hangup_all();
+ STANDARD_HANGUP_LOCALUSERS;
/* Unlock so something else can destroy the lock. */
opbx_mutex_unlock(&mysql_lock);
_______________________________________________
Openpbx-dev mailing list
[email protected]
http://lists.openpbx.org/mailman/listinfo/openpbx-dev