[Freeswitch-trunk] [commit] r12371 - in freeswitch/trunk/src: . include mod/applications/mod_limit mod/endpoints/mod_sofia
FreeSWITCH SVN
mrene at freeswitch.org
Tue Mar 3 09:03:48 PST 2009
Author: mrene
Date: Tue Mar 3 11:03:48 2009
New Revision: 12371
Log:
Revert 12370
Modified:
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_core.c
freeswitch/trunk/src/switch_core_db.c
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Tue Mar 3 11:03:48 2009
@@ -413,7 +413,7 @@
\brief Unsets private from a given channel
\param channel channel to unsets data from
\param key your private data's unique keyname
- \return SWITCH_STATUS_SUCCESS if data was unset
+ \return void pointer to channel's private data
*/
SWITCH_DECLARE(switch_status_t) switch_channel_unset_private(switch_channel_t *channel, const char *key);
Modified: freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_limit/mod_limit.c Tue Mar 3 11:03:48 2009
@@ -289,7 +289,7 @@
sql = switch_mprintf("delete from limit_data where hostname='%q';", globals.hostname);
limit_execute_sql(sql, globals.mutex);
- switch_core_db_free(sql);
+ switch_safe_free(sql);
switch_xml_free(xml);
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Tue Mar 3 11:03:48 2009
@@ -3133,7 +3133,7 @@
switch_odbc_handle_exec(profile->master_odbc, "DROP TABLE sip_registrations", NULL);
switch_odbc_handle_exec(profile->master_odbc, reg_sql, NULL);
}
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_subscriptions where hostname='%q'", mod_sofia_globals.hostname);
@@ -3143,7 +3143,7 @@
switch_odbc_handle_exec(profile->master_odbc, sub_sql, NULL);
}
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q'", mod_sofia_globals.hostname);
if (switch_odbc_handle_exec(profile->master_odbc, test_sql, NULL) != SWITCH_ODBC_SUCCESS) {
@@ -3158,21 +3158,21 @@
switch_odbc_handle_exec(profile->master_odbc, pres_sql, NULL);
}
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_authentication where 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_authentication", NULL);
switch_odbc_handle_exec(profile->master_odbc, auth_sql, NULL);
}
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_shared_appearance_subscriptions where contact_str='' or 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_shared_appearance_subscriptions", NULL);
switch_odbc_handle_exec(profile->master_odbc, shared_appearance_sql, NULL);
}
- switch_core_db_free(test_sql);
+ free(test_sql);
for (x = 0; indexes[x]; x++) {
switch_odbc_handle_exec(profile->master_odbc, indexes[x], NULL);
@@ -3192,28 +3192,28 @@
mod_sofia_globals.hostname);
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_registrations", reg_sql);
- switch_core_db_free(test_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);
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_dialogs where hostname='%q'", mod_sofia_globals.hostname);
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_dialogs", dialog_sql);
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_presence where hostname='%q'", mod_sofia_globals.hostname);
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_presence", pres_sql);
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_authentication where hostname='%q'", mod_sofia_globals.hostname);
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_authentication", auth_sql);
- switch_core_db_free(test_sql);
+ free(test_sql);
test_sql = switch_mprintf("delete from sip_shared_appearance_subscriptions where contact_str = '' or hostname='%q'", mod_sofia_globals.hostname);
switch_core_db_test_reactive(profile->master_db, test_sql, "DROP TABLE sip_shared_appearance_subscriptions", shared_appearance_sql);
- switch_core_db_free(test_sql);
+ free(test_sql);
switch_core_db_exec(profile->master_db, "create index if not exists ssa_hostname on sip_shared_appearance_subscriptions (hostname)",
NULL, NULL, NULL);
Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c (original)
+++ freeswitch/trunk/src/switch_core.c Tue Mar 3 11:03:48 2009
@@ -758,7 +758,7 @@
end:
- switch_core_db_free(mime_path);
+ switch_safe_free(mime_path);
}
@@ -1034,7 +1034,7 @@
dir_path = switch_mprintf("%s%ssounds", SWITCH_GLOBAL_dirs.base_dir, SWITCH_PATH_SEPARATOR);
switch_dir_make_recursive(dir_path, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
- switch_core_db_free(dir_path);
+ switch_safe_free(dir_path);
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.base_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.mod_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
switch_dir_make_recursive(SWITCH_GLOBAL_dirs.conf_dir, SWITCH_DEFAULT_DIR_PERMS, runtime.memory_pool);
Modified: freeswitch/trunk/src/switch_core_db.c
==============================================================================
--- freeswitch/trunk/src/switch_core_db.c (original)
+++ freeswitch/trunk/src/switch_core_db.c Tue Mar 3 11:03:48 2009
@@ -85,7 +85,7 @@
ret = sqlite3_exec(db, sql, callback, data, &err);
if (ret == SQLITE_BUSY || ret == SQLITE_LOCKED) {
if (sane > 1) {
- switch_core_db_free(err);
+ switch_safe_free(err);
switch_cond_next();
continue;
}
More information about the Freeswitch-trunk
mailing list