Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
cf3ba5a4
提交
cf3ba5a4
authored
4月 24, 2017
作者:
Mike Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-10260: [mod_conference] add conference count api command
上级
67f60ad2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
23 行增加
和
0 行删除
+23
-0
conference_api.c
src/mod/applications/mod_conference/conference_api.c
+22
-0
mod_conference.h
src/mod/applications/mod_conference/mod_conference.h
+1
-0
没有找到文件。
src/mod/applications/mod_conference/conference_api.c
浏览文件 @
cf3ba5a4
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
api_command_t
conference_api_sub_commands
[]
=
{
api_command_t
conference_api_sub_commands
[]
=
{
{
"count"
,
(
void_fn_t
)
&
conference_api_sub_count
,
CONF_API_SUB_ARGS_SPLIT
,
"count"
,
""
},
{
"list"
,
(
void_fn_t
)
&
conference_api_sub_list
,
CONF_API_SUB_ARGS_SPLIT
,
"list"
,
"[delim <string>]|[count]"
},
{
"list"
,
(
void_fn_t
)
&
conference_api_sub_list
,
CONF_API_SUB_ARGS_SPLIT
,
"list"
,
"[delim <string>]|[count]"
},
{
"xml_list"
,
(
void_fn_t
)
&
conference_api_sub_xml_list
,
CONF_API_SUB_ARGS_SPLIT
,
"xml_list"
,
""
},
{
"xml_list"
,
(
void_fn_t
)
&
conference_api_sub_xml_list
,
CONF_API_SUB_ARGS_SPLIT
,
"xml_list"
,
""
},
{
"json_list"
,
(
void_fn_t
)
&
conference_api_sub_json_list
,
CONF_API_SUB_ARGS_SPLIT
,
"json_list"
,
"[compact]"
},
{
"json_list"
,
(
void_fn_t
)
&
conference_api_sub_json_list
,
CONF_API_SUB_ARGS_SPLIT
,
"json_list"
,
"[compact]"
},
...
@@ -220,6 +221,8 @@ switch_status_t conference_api_main_real(const char *cmd, switch_core_session_t
...
@@ -220,6 +221,8 @@ switch_status_t conference_api_main_real(const char *cmd, switch_core_session_t
/* special case the list command, because it doesn't require a conference argument */
/* special case the list command, because it doesn't require a conference argument */
if
(
strcasecmp
(
argv
[
0
],
"list"
)
==
0
)
{
if
(
strcasecmp
(
argv
[
0
],
"list"
)
==
0
)
{
conference_api_sub_list
(
NULL
,
stream
,
argc
,
argv
);
conference_api_sub_list
(
NULL
,
stream
,
argc
,
argv
);
}
else
if
(
strcasecmp
(
argv
[
0
],
"count"
)
==
0
)
{
conference_api_sub_count
(
NULL
,
stream
,
argc
,
argv
);
}
else
if
(
strcasecmp
(
argv
[
0
],
"xml_list"
)
==
0
)
{
}
else
if
(
strcasecmp
(
argv
[
0
],
"xml_list"
)
==
0
)
{
conference_api_sub_xml_list
(
NULL
,
stream
,
argc
,
argv
);
conference_api_sub_xml_list
(
NULL
,
stream
,
argc
,
argv
);
}
else
if
(
strcasecmp
(
argv
[
0
],
"json_list"
)
==
0
)
{
}
else
if
(
strcasecmp
(
argv
[
0
],
"json_list"
)
==
0
)
{
...
@@ -1663,6 +1666,25 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
...
@@ -1663,6 +1666,25 @@ switch_status_t conference_api_sub_vid_layout(conference_obj_t *conference, swit
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
switch_status_t
conference_api_sub_count
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
if
(
conference
)
{
conference_list_count_only
(
conference
,
stream
);
}
else
{
int
count
=
0
;
switch_hash_index_t
*
hi
;
switch_mutex_lock
(
conference_globals
.
hash_mutex
);
for
(
hi
=
switch_core_hash_first
(
conference_globals
.
conference_hash
);
hi
;
hi
=
switch_core_hash_next
(
&
hi
))
{
count
++
;
}
switch_mutex_unlock
(
conference_globals
.
hash_mutex
);
stream
->
write_function
(
stream
,
"%d"
,
count
);
}
return
SWITCH_STATUS_SUCCESS
;
}
switch_status_t
conference_api_sub_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
switch_status_t
conference_api_sub_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
)
{
{
int
ret_status
=
SWITCH_STATUS_GENERR
;
int
ret_status
=
SWITCH_STATUS_GENERR
;
...
...
src/mod/applications/mod_conference/mod_conference.h
浏览文件 @
cf3ba5a4
...
@@ -1214,6 +1214,7 @@ switch_status_t conference_api_sub_write_png(conference_obj_t *conference, switc
...
@@ -1214,6 +1214,7 @@ switch_status_t conference_api_sub_write_png(conference_obj_t *conference, switc
switch_status_t
conference_api_sub_file_vol
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_file_vol
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_recording
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_recording
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_vid_layout
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_vid_layout
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_count
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_xml_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_xml_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_json_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
switch_status_t
conference_api_sub_json_list
(
conference_obj_t
*
conference
,
switch_stream_handle_t
*
stream
,
int
argc
,
char
**
argv
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论