mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
look out below....(make current)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10363 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -39,12 +39,14 @@ SWITCH_MODULE_DEFINITION(mod_dialplan_asterisk, mod_dialplan_asterisk_load, NULL
|
||||
static switch_status_t exec_app(switch_core_session_t *session, char *app, char *arg)
|
||||
{
|
||||
const switch_application_interface_t *application_interface;
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if ((application_interface = switch_loadable_module_get_application_interface(app))) {
|
||||
return switch_core_session_exec(session, application_interface, arg);
|
||||
status = switch_core_session_exec(session, application_interface, arg);
|
||||
UNPROTECT_INTERFACE(application_interface);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_FALSE;
|
||||
return status;
|
||||
}
|
||||
|
||||
SWITCH_STANDARD_APP(dial_function)
|
||||
|
||||
@@ -1168,9 +1168,9 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
|
||||
} else if (!strcasecmp(val, "contact") || switch_true(val)) {
|
||||
profile->pflags |= PFLAG_MULTIREG;
|
||||
profile->pflags |= PFLAG_MULTIREG_CONTACT;
|
||||
} else {
|
||||
} else if (switch_true(val)) {
|
||||
profile->pflags &= ~PFLAG_MULTIREG;
|
||||
profile->pflags &= ~PFLAG_MULTIREG_CONTACT;
|
||||
//profile->pflags &= ~PFLAG_MULTIREG_CONTACT;
|
||||
}
|
||||
} else if (!strcasecmp(var, "supress-cng") || !strcasecmp(var, "suppress-cng")) {
|
||||
if (switch_true(val)) {
|
||||
@@ -1629,9 +1629,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
|
||||
} else if (!strcasecmp(val, "contact") || switch_true(val)) {
|
||||
profile->pflags |= PFLAG_MULTIREG;
|
||||
profile->pflags |= PFLAG_MULTIREG_CONTACT;
|
||||
} else {
|
||||
} else if (switch_true(val)) {
|
||||
profile->pflags &= ~PFLAG_MULTIREG;
|
||||
profile->pflags &= ~PFLAG_MULTIREG_CONTACT;
|
||||
//profile->pflags &= ~PFLAG_MULTIREG_CONTACT;
|
||||
}
|
||||
} else if (!strcasecmp(var, "supress-cng") || !strcasecmp(var, "suppress-cng")) {
|
||||
if (switch_true(val)) {
|
||||
|
||||
@@ -2865,10 +2865,15 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected ODBC DSN: %s\n", profile->odbc_dsn);
|
||||
|
||||
if (switch_odbc_handle_exec(profile->master_odbc, "select hostname from sip_registrations", NULL) != SWITCH_ODBC_SUCCESS) {
|
||||
test_sql = switch_mprintf("delete from sip_registrations where (contact like '%%TCP%%' "
|
||||
"or status like '%%TCP%%' or status like '%%TLS%%') and hostname='%q'",
|
||||
mod_sofia_globals.hostname);
|
||||
|
||||
if (switch_odbc_handle_exec(profile->master_odbc, test_sql, NULL) != SWITCH_ODBC_SUCCESS) {
|
||||
switch_odbc_handle_exec(profile->master_odbc, "DROP TABLE sip_registrations", NULL);
|
||||
switch_odbc_handle_exec(profile->master_odbc, reg_sql, NULL);
|
||||
}
|
||||
free(test_sql);
|
||||
|
||||
|
||||
test_sql = switch_mprintf("delete from sip_subscriptions where hostname='%q'", mod_sofia_globals.hostname);
|
||||
@@ -2898,13 +2903,18 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||
#else
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
|
||||
#endif
|
||||
} else {
|
||||
} else {
|
||||
if (!(profile->master_db = switch_core_db_open_file(profile->dbname))) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch_core_db_test_reactive(profile->master_db, "select hostname from sip_registrations", "DROP TABLE sip_registrations", reg_sql);
|
||||
test_sql = switch_mprintf("delete from sip_registrations where (contact like '%%TCP%%' "
|
||||
"or status like '%%TCP%%' or status like '%%TLS%%') and hostname='%q'",
|
||||
mod_sofia_globals.hostname);
|
||||
|
||||
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_registrations", reg_sql);
|
||||
free(test_sql);
|
||||
|
||||
test_sql = switch_mprintf("delete from sip_subscriptions where hostname='%q'", mod_sofia_globals.hostname);
|
||||
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_subscriptions", sub_sql);
|
||||
free(test_sql);
|
||||
|
||||
@@ -249,6 +249,11 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
|
||||
}
|
||||
|
||||
done:
|
||||
|
||||
if (fh.file_interface) {
|
||||
switch_core_file_close(&fh);
|
||||
}
|
||||
|
||||
source->ready = 0;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
switch_core_hash_delete(globals.source_hash, source->name);
|
||||
|
||||
@@ -2222,6 +2222,7 @@ static JSBool session_execute(JSContext * cx, JSObject * obj, uintN argc, jsval
|
||||
check_hangup_hook(jss, &ret);
|
||||
retval = JS_TRUE;
|
||||
}
|
||||
UNPROTECT_INTERFACE(application_interface);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user