FS-5527 --resolve

This commit is contained in:
Anthony Minessale
2013-06-28 10:42:01 -05:00
parent 72aad68965
commit dac93d7936
5 changed files with 65 additions and 22 deletions
+19
View File
@@ -3488,6 +3488,21 @@ static void config_sofia_profile_urls(sofia_profile_t * profile)
}
}
#ifdef SOFIA_CUSTOM_TIME
/* appears to not be granular enough */
static void sofia_time(su_time_t *tv)
{
switch_time_t now;
if (tv) {
now = switch_micro_time_now();
tv->tv_sec = ((uint32_t) (now / 1000000)) + 2208988800UL;
tv->tv_usec = (uint32_t) (now % 1000000);
}
}
#endif
switch_status_t sofia_init(void)
{
su_init();
@@ -3496,6 +3511,10 @@ switch_status_t sofia_init(void)
return SWITCH_STATUS_GENERR;
}
#ifdef SOFIA_TIME
su_set_time_func(sofia_time);
#endif
/* Redirect loggers in sofia */
su_log_redirect(su_log_default, logger, NULL);
su_log_redirect(tport_log, logger, NULL);