mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 00:00:44 +00:00
FS-2917
This commit is contained in:
parent
e086b80632
commit
1cf79386c8
@ -151,13 +151,21 @@ static void check_ip(void)
|
||||
SWITCH_STANDARD_SCHED_FUNC(heartbeat_callback)
|
||||
{
|
||||
send_heartbeat();
|
||||
check_ip();
|
||||
|
||||
/* reschedule this task */
|
||||
task->runtime = switch_epoch_time_now(NULL) + 20;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_STANDARD_SCHED_FUNC(check_ip_callback)
|
||||
{
|
||||
check_ip();
|
||||
|
||||
/* reschedule this task */
|
||||
task->runtime = switch_epoch_time_now(NULL) + 60;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_set_console(const char *console)
|
||||
{
|
||||
if ((runtime.console = fopen(console, "a")) == 0) {
|
||||
@ -1357,6 +1365,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
|
||||
|
||||
switch_scheduler_add_task(switch_epoch_time_now(NULL), heartbeat_callback, "heartbeat", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL);
|
||||
|
||||
switch_scheduler_add_task(switch_epoch_time_now(NULL), check_ip_callback, "check_ip", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL | SSHF_OWN_THREAD);
|
||||
|
||||
switch_uuid_get(&uuid);
|
||||
switch_uuid_format(runtime.uuid_str, &uuid);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user