Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: 1.2.0
-
Component/s: freeswitch-core
-
Labels:None
-
Environment:Windows 7, Visual Studio 2010
-
Platform:Win32_64/VS
-
CPU Info:N/A
-
FreeSWITCH GIT Revision:b1ae97466d95ff68abdf8b84216dcecbdb3cbcc8
-
Reproduced with GIT HEAD?:Yes
Description
This patch fixes a few glitches introduced in commit b1ae974.
- switch_time_ref() should return monotonic clock reference when SYSTEM_TIME is not enabled
- runtime.offset should be calculated using monotonic reference in switch_time_sync(), when SYSTEM_TIME is not enabled.
- When looping to check if the monotonic clock is working, the monotonic reference should be used if not setting SYSTEM_TIME has been set (changed to switch_time_ref) - Maybe always the monotonic reference should be used (-1) if MONO is enabled, since that what's this check are really for anyway.
I think these changes should make everything work as before.
While wring this I realized yet another thing - I will post the patch soon :)
/Peter
- switch_time_ref() should return monotonic clock reference when SYSTEM_TIME is not enabled
- runtime.offset should be calculated using monotonic reference in switch_time_sync(), when SYSTEM_TIME is not enabled.
- When looping to check if the monotonic clock is working, the monotonic reference should be used if not setting SYSTEM_TIME has been set (changed to switch_time_ref) - Maybe always the monotonic reference should be used (-1) if MONO is enabled, since that what's this check are really for anyway.
I think these changes should make everything work as before.
While wring this I realized yet another thing - I will post the patch soon :)
/Peter
Issue Links
- is related to
-
FS-4390
regression from commit b1ae97466d95ff68abdf8b84216dcecbdb3cbcc8
-
I also added an update to runtime.mono_initiated, if the monotonic clock in Windows is enabled, since that will initialize too late.
I think now that we should maybe make the monotonic clock in Windows default as well. Do you think that's a good idea? I'll fix a patch if it sounds ok for you.
If Windows user want to go the old way, they can just use your new param instead.
/Peter