mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-13 23:04:13 +00:00
christmas presence
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6783 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
97eb3a39c5
commit
ecffbdca4e
5 files changed
+53
-26
No files matched your search
@@ -1694,7 +1694,8 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||
" contact VARCHAR(1024),\n"
|
||||
" status VARCHAR(255),\n"
|
||||
" rpid VARCHAR(255),\n"
|
||||
" expires INTEGER"
|
||||
" expires INTEGER,\n"
|
||||
" user_agent VARCHAR(255)\n"
|
||||
");\n";
|
||||
|
||||
char sub_sql[] =
|
||||
@@ -1709,7 +1710,9 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||
" call_id VARCHAR(255),\n"
|
||||
" full_from VARCHAR(255),\n"
|
||||
" full_via VARCHAR(255),\n"
|
||||
" expires INTEGER"
|
||||
" expires INTEGER,\n"
|
||||
" user_agent VARCHAR(255),\n"
|
||||
" accept VARCHAR(255)\n"
|
||||
");\n";
|
||||
|
||||
|
||||
@@ -1731,12 +1734,12 @@ 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 sip_user from sip_registrations", NULL) != SWITCH_ODBC_SUCCESS) {
|
||||
if (switch_odbc_handle_exec(profile->master_odbc, "select sip_user,user_agent from sip_registrations", 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);
|
||||
}
|
||||
|
||||
if (switch_odbc_handle_exec(profile->master_odbc, "delete from sip_subscriptions where sip_user != ''", NULL) != SWITCH_ODBC_SUCCESS) {
|
||||
if (switch_odbc_handle_exec(profile->master_odbc, "delete from sip_subscriptions where sip_user != '' or accept != ''", NULL) != SWITCH_ODBC_SUCCESS) {
|
||||
switch_odbc_handle_exec(profile->master_odbc, "DROP TABLE sip_subscriptions", NULL);
|
||||
switch_odbc_handle_exec(profile->master_odbc, sub_sql, NULL);
|
||||
}
|
||||
@@ -1753,8 +1756,8 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch_core_db_test_reactive(profile->master_db, "select sip_user from sip_registrations", "DROP TABLE sip_registrations", reg_sql);
|
||||
switch_core_db_test_reactive(profile->master_db, "delete * from sip_subscriptions where sip_user != ''", "DROP TABLE sip_subscriptions", sub_sql);
|
||||
switch_core_db_test_reactive(profile->master_db, "select sip_user,user_agent from sip_registrations", "DROP TABLE sip_registrations", reg_sql);
|
||||
switch_core_db_test_reactive(profile->master_db, "delete from sip_subscriptions where sip_user != '' or accept != ''", "DROP TABLE sip_subscriptions", sub_sql);
|
||||
switch_core_db_test_reactive(profile->master_db, "select * from sip_authentication", "DROP TABLE sip_authentication", auth_sql);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user