Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
f9969f38
提交
f9969f38
authored
7月 14, 2011
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
only list real profiles not aliases in presence code
上级
6925af68
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
7 行删除
+19
-7
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+11
-1
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+3
-1
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+1
-1
sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_presence.c
+4
-4
没有找到文件。
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
f9969f38
...
@@ -4962,7 +4962,7 @@ static void general_event_handler(switch_event_t *event)
...
@@ -4962,7 +4962,7 @@ static void general_event_handler(switch_event_t *event)
}
}
}
}
switch_status_t
list_profiles
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
match
es
)
switch_status_t
list_profiles
_full
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
,
switch_bool_t
show_alias
es
)
{
{
sofia_profile_t
*
profile
=
NULL
;
sofia_profile_t
*
profile
=
NULL
;
switch_hash_index_t
*
hi
;
switch_hash_index_t
*
hi
;
...
@@ -4974,7 +4974,12 @@ switch_status_t list_profiles(const char *line, const char *cursor, switch_conso
...
@@ -4974,7 +4974,12 @@ switch_status_t list_profiles(const char *line, const char *cursor, switch_conso
switch_mutex_lock
(
mod_sofia_globals
.
hash_mutex
);
switch_mutex_lock
(
mod_sofia_globals
.
hash_mutex
);
for
(
hi
=
switch_hash_first
(
NULL
,
mod_sofia_globals
.
profile_hash
);
hi
;
hi
=
switch_hash_next
(
hi
))
{
for
(
hi
=
switch_hash_first
(
NULL
,
mod_sofia_globals
.
profile_hash
);
hi
;
hi
=
switch_hash_next
(
hi
))
{
switch_hash_this
(
hi
,
&
vvar
,
NULL
,
&
val
);
switch_hash_this
(
hi
,
&
vvar
,
NULL
,
&
val
);
profile
=
(
sofia_profile_t
*
)
val
;
profile
=
(
sofia_profile_t
*
)
val
;
if
(
!
show_aliases
&&
strcmp
((
char
*
)
vvar
,
profile
->
name
))
{
continue
;
}
if
(
sofia_test_pflag
(
profile
,
PFLAG_RUNNING
))
{
if
(
sofia_test_pflag
(
profile
,
PFLAG_RUNNING
))
{
switch_console_push_match
(
&
my_matches
,
(
const
char
*
)
vvar
);
switch_console_push_match
(
&
my_matches
,
(
const
char
*
)
vvar
);
}
}
...
@@ -4990,6 +4995,11 @@ switch_status_t list_profiles(const char *line, const char *cursor, switch_conso
...
@@ -4990,6 +4995,11 @@ switch_status_t list_profiles(const char *line, const char *cursor, switch_conso
return
status
;
return
status
;
}
}
switch_status_t
list_profiles
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
)
{
return
list_profiles_full
(
line
,
cursor
,
matches
,
SWITCH_TRUE
);
}
static
switch_status_t
list_gateways
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
)
static
switch_status_t
list_gateways
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
)
{
{
sofia_profile_t
*
profile
=
NULL
;
sofia_profile_t
*
profile
=
NULL
;
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
f9969f38
...
@@ -1081,8 +1081,10 @@ switch_status_t sofia_set_loglevel(const char *name, int level);
...
@@ -1081,8 +1081,10 @@ switch_status_t sofia_set_loglevel(const char *name, int level);
* \note Valid components are "default" (sofia's default logger), "tport", "iptsec", "nea", "nta", "nth_client", "nth_server", "nua", "soa", "sresolv", "stun"
* \note Valid components are "default" (sofia's default logger), "tport", "iptsec", "nea", "nta", "nth_client", "nth_server", "nua", "soa", "sresolv", "stun"
* \return the component's loglevel, or -1 if the component isn't valid
* \return the component's loglevel, or -1 if the component isn't valid
*/
*/
switch_status_t
list_profiles
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
);
int
sofia_get_loglevel
(
const
char
*
name
);
int
sofia_get_loglevel
(
const
char
*
name
);
switch_status_t
list_profiles_full
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
,
switch_bool_t
show_aliases
);
switch_status_t
list_profiles
(
const
char
*
line
,
const
char
*
cursor
,
switch_console_callback_match_t
**
matches
);
sofia_cid_type_t
sofia_cid_name2type
(
const
char
*
name
);
sofia_cid_type_t
sofia_cid_name2type
(
const
char
*
name
);
void
sofia_glue_tech_set_local_sdp
(
private_object_t
*
tech_pvt
,
const
char
*
sdp_str
,
switch_bool_t
dup
);
void
sofia_glue_tech_set_local_sdp
(
private_object_t
*
tech_pvt
,
const
char
*
sdp_str
,
switch_bool_t
dup
);
void
sofia_glue_set_rtp_stats
(
private_object_t
*
tech_pvt
);
void
sofia_glue_set_rtp_stats
(
private_object_t
*
tech_pvt
);
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
f9969f38
...
@@ -5541,7 +5541,7 @@ int sofia_glue_recover(switch_bool_t flush)
...
@@ -5541,7 +5541,7 @@ int sofia_glue_recover(switch_bool_t flush)
switch_console_callback_match_t
*
matches
;
switch_console_callback_match_t
*
matches
;
if
(
list_profiles
(
NULL
,
NULL
,
&
matches
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
list_profiles
_full
(
NULL
,
NULL
,
&
matches
,
SWITCH_FALSE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_console_callback_match_node_t
*
m
;
switch_console_callback_match_node_t
*
m
;
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
if
((
profile
=
sofia_glue_find_profile
(
m
->
val
)))
{
if
((
profile
=
sofia_glue_find_profile
(
m
->
val
)))
{
...
...
src/mod/endpoints/mod_sofia/sofia_presence.c
浏览文件 @
f9969f38
...
@@ -282,7 +282,7 @@ void sofia_presence_cancel(void)
...
@@ -282,7 +282,7 @@ void sofia_presence_cancel(void)
return
;
return
;
}
}
if
(
list_profiles
(
NULL
,
NULL
,
&
matches
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
list_profiles
_full
(
NULL
,
NULL
,
&
matches
,
SWITCH_FALSE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_console_callback_match_node_t
*
m
;
switch_console_callback_match_node_t
*
m
;
sql
=
switch_mprintf
(
"select proto,sip_user,sip_host,sub_to_user,sub_to_host,event,contact,call_id,full_from,"
sql
=
switch_mprintf
(
"select proto,sip_user,sip_host,sub_to_user,sub_to_host,event,contact,call_id,full_from,"
...
@@ -409,7 +409,7 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
...
@@ -409,7 +409,7 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event)
sql
=
switch_mprintf
(
"select profile_name from sip_registrations where sip_host='%s' or mwi_host='%s'"
,
host
,
host
);
sql
=
switch_mprintf
(
"select profile_name from sip_registrations where sip_host='%s' or mwi_host='%s'"
,
host
,
host
);
if
(
list_profiles
(
NULL
,
NULL
,
&
matches
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
list_profiles
_full
(
NULL
,
NULL
,
&
matches
,
SWITCH_FALSE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_console_callback_match_node_t
*
m
;
switch_console_callback_match_node_t
*
m
;
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
...
@@ -592,7 +592,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
...
@@ -592,7 +592,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
switch_assert
(
sql
!=
NULL
);
switch_assert
(
sql
!=
NULL
);
if
(
list_profiles
(
NULL
,
NULL
,
&
matches
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
list_profiles
_full
(
NULL
,
NULL
,
&
matches
,
SWITCH_FALSE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_console_callback_match_node_t
*
m
;
switch_console_callback_match_node_t
*
m
;
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
...
@@ -788,7 +788,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
...
@@ -788,7 +788,7 @@ static void actual_sofia_presence_event_handler(switch_event_t *event)
goto
done
;
goto
done
;
}
}
if
(
list_profiles
(
NULL
,
NULL
,
&
matches
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
list_profiles
_full
(
NULL
,
NULL
,
&
matches
,
SWITCH_FALSE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_console_callback_match_node_t
*
m
;
switch_console_callback_match_node_t
*
m
;
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
for
(
m
=
matches
->
head
;
m
;
m
=
m
->
next
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论