add graceful zrtp failure
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14745 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4a9b1b2261
commit
623e9d87d8
|
@ -600,12 +600,16 @@ SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool)
|
|||
|
||||
zrtp_log_set_log_engine(zrtp_logger);
|
||||
zrtp_log_set_level(4);
|
||||
if (zrtp_status_ok != zrtp_init(&zrtp_config, &zrtp_global)) {
|
||||
abort();
|
||||
if (zrtp_status_ok == zrtp_init(&zrtp_config, &zrtp_global)) {
|
||||
|
||||
memcpy(zid, zid_string, 12);
|
||||
switch_scheduler_add_task(switch_epoch_time_now(NULL) + 900, zrtp_cache_save_callback, "zrtp_cache_save", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL);
|
||||
} else {
|
||||
switch_core_set_variable("zrtp_enabled", NULL);
|
||||
zrtp_on = 0;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "ZRTP init failed!\n");
|
||||
}
|
||||
|
||||
memcpy(zid, zid_string, 12);
|
||||
switch_scheduler_add_task(switch_epoch_time_now(NULL) + 900, zrtp_cache_save_callback, "zrtp_cache_save", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL);
|
||||
}
|
||||
#endif
|
||||
srtp_init();
|
||||
|
|
Loading…
Reference in New Issue