Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
05444a6e
提交
05444a6e
authored
8月 07, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-5661 --resolve
上级
22ab34c5
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
19 行增加
和
3 行删除
+19
-3
switch_scheduler.h
src/include/switch_scheduler.h
+1
-0
mod_commands.c
src/mod/applications/mod_commands/mod_commands.c
+4
-2
mod_dptools.c
src/mod/applications/mod_dptools/mod_dptools.c
+3
-1
switch_scheduler.c
src/switch_scheduler.c
+11
-0
没有找到文件。
src/include/switch_scheduler.h
浏览文件 @
05444a6e
...
...
@@ -43,6 +43,7 @@ SWITCH_BEGIN_EXTERN_C
int64_t
created
;
int64_t
runtime
;
uint32_t
cmd_id
;
uint32_t
repeat
;
char
*
group
;
void
*
cmd_arg
;
uint32_t
task_id
;
...
...
src/mod/applications/mod_commands/mod_commands.c
浏览文件 @
05444a6e
...
...
@@ -3164,7 +3164,7 @@ SWITCH_STANDARD_API(uuid_broadcast_function)
return
SWITCH_STATUS_SUCCESS
;
}
#define SCHED_BROADCAST_SYNTAX "[
+]<time>
<uuid> <path> [aleg|bleg|both]"
#define SCHED_BROADCAST_SYNTAX "[
[+]<time>|@time]
<uuid> <path> [aleg|bleg|both]"
SWITCH_STANDARD_API
(
sched_broadcast_function
)
{
char
*
mycmd
=
NULL
,
*
argv
[
4
]
=
{
0
};
...
...
@@ -3180,7 +3180,9 @@ SWITCH_STANDARD_API(sched_broadcast_function)
switch_media_flag_t
flags
=
SMF_NONE
;
time_t
when
;
if
(
*
argv
[
0
]
==
'+'
)
{
if
(
*
argv
[
0
]
==
'@'
)
{
when
=
atol
(
argv
[
0
]
+
1
);
}
else
if
(
*
argv
[
0
]
==
'+'
)
{
when
=
switch_epoch_time_now
(
NULL
)
+
atol
(
argv
[
0
]
+
1
);
}
else
{
when
=
atol
(
argv
[
0
]);
...
...
src/mod/applications/mod_dptools/mod_dptools.c
浏览文件 @
05444a6e
...
...
@@ -1121,7 +1121,9 @@ SWITCH_STANDARD_APP(sched_broadcast_function)
uint32_t
id
;
char
ids
[
80
]
=
""
;
if
(
*
argv
[
0
]
==
'+'
)
{
if
(
*
argv
[
0
]
==
'@'
)
{
when
=
atol
(
argv
[
0
]
+
1
);
}
else
if
(
*
argv
[
0
]
==
'+'
)
{
when
=
switch_epoch_time_now
(
NULL
)
+
atol
(
argv
[
0
]
+
1
);
}
else
{
when
=
atol
(
argv
[
0
]);
...
...
src/switch_scheduler.c
浏览文件 @
05444a6e
...
...
@@ -61,6 +61,10 @@ static void switch_scheduler_execute(switch_scheduler_task_container_t *tp)
tp
->
func
(
&
tp
->
task
);
if
(
tp
->
task
.
repeat
)
{
tp
->
task
.
runtime
=
switch_epoch_time_now
(
NULL
)
+
tp
->
task
.
repeat
;
}
if
(
tp
->
task
.
runtime
>
tp
->
executed
)
{
tp
->
executed
=
0
;
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_RE_SCHEDULE
)
==
SWITCH_STATUS_SUCCESS
)
{
...
...
@@ -190,10 +194,17 @@ SWITCH_DECLARE(uint32_t) switch_scheduler_add_task(time_t task_runtime,
{
switch_scheduler_task_container_t
*
container
,
*
tp
;
switch_event_t
*
event
;
switch_time_t
now
=
switch_epoch_time_now
(
NULL
);
switch_mutex_lock
(
globals
.
task_mutex
);
switch_zmalloc
(
container
,
sizeof
(
*
container
));
switch_assert
(
func
);
if
(
task_runtime
<
now
)
{
container
->
task
.
repeat
=
task_runtime
;
task_runtime
+=
now
;
}
container
->
func
=
func
;
container
->
task
.
created
=
switch_epoch_time_now
(
NULL
);
container
->
task
.
runtime
=
task_runtime
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论