Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
912e05d8
提交
912e05d8
authored
10月 02, 2013
作者:
Nathan Neulinger
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5832 additional hostname updates for failover behavior
上级
3b36e990
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
4 行删除
+15
-4
switch_console.c
src/switch_console.c
+2
-1
switch_core_sqldb.c
src/switch_core_sqldb.c
+13
-3
没有找到文件。
src/switch_console.c
浏览文件 @
912e05d8
...
...
@@ -1882,7 +1882,8 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_complete(const char *string)
}
else
if
(
!
strcasecmp
(
argv
[
0
],
"del"
))
{
char
*
what
=
argv
[
1
];
if
(
!
strcasecmp
(
what
,
"*"
))
{
switch_core_sql_exec
(
"delete from complete"
);
mystream
.
write_function
(
&
mystream
,
"delete from complete where hostname='%s'"
,
switch_core_get_hostname
());
switch_core_sql_exec
(
mystream
.
data
);
}
else
{
mystream
.
write_function
(
&
mystream
,
"delete from complete where "
);
for
(
x
=
0
;
x
<
argc
-
1
;
x
++
)
{
...
...
src/switch_core_sqldb.c
浏览文件 @
912e05d8
...
...
@@ -2317,7 +2317,7 @@ static void core_event_handler(switch_event_t *event)
new_sql
()
=
switch_mprintf
(
"delete from channels where hostname='%q';"
"delete from interfaces where hostname='%q';"
"delete from calls where hostname='%q'"
,
switch_core_get_switchname
(),
switch_core_get_
switch
name
(),
switch_core_get_switchname
()
switch_core_get_switchname
(),
switch_core_get_
host
name
(),
switch_core_get_switchname
()
);
break
;
case
SWITCH_EVENT_LOG
:
...
...
@@ -3106,7 +3106,7 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_
case
SCDB_TYPE_ODBC
:
if
(
switch_test_flag
((
&
runtime
),
SCF_CLEAR_SQL
))
{
char
sql
[
512
]
=
""
;
char
*
tables
[]
=
{
"channels"
,
"calls"
,
"
interfaces"
,
"
tasks"
,
NULL
};
char
*
tables
[]
=
{
"channels"
,
"calls"
,
"tasks"
,
NULL
};
int
i
;
const
char
*
hostname
=
switch_core_get_switchname
();
...
...
@@ -3265,8 +3265,18 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_
break
;
}
if
(
switch_test_flag
((
&
runtime
),
SCF_CLEAR_SQL
))
{
char
sql
[
512
]
=
""
;
char
*
tables
[]
=
{
"complete"
,
"interfaces"
,
NULL
};
int
i
;
const
char
*
hostname
=
switch_core_get_hostname
();
for
(
i
=
0
;
tables
[
i
];
i
++
)
{
switch_snprintfv
(
sql
,
sizeof
(
sql
),
"delete from %q where hostname='%q'"
,
tables
[
i
],
hostname
);
switch_cache_db_execute_sql
(
sql_manager
.
dbh
,
sql
,
NULL
);
}
}
switch_cache_db_execute_sql
(
sql_manager
.
dbh
,
"delete from complete where sticky=0"
,
NULL
);
switch_cache_db_execute_sql
(
sql_manager
.
dbh
,
"delete from aliases where sticky=0"
,
NULL
);
switch_cache_db_execute_sql
(
sql_manager
.
dbh
,
"delete from nat where sticky=0"
,
NULL
);
switch_cache_db_execute_sql
(
sql_manager
.
dbh
,
"create index alias1 on aliases (alias)"
,
NULL
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论