On 05.02.21 10:25, VAUTRIN Emmanuel (Canal Plus Prestataire) wrote:
> Well, the ts sync engine is stopped at this point. ts_service is
> the initial startup. So why should 'service == ts_service' checks not
> behave correctly? ts_service = NULL is looks correct. If you think the
> checks are not correct then we need to review them now. Adding
> 'ts_service = service' before the timerservers_list check looks bogus
> and is papering over a problem if 'ts_servce = NULL;' doesn't work.
In fact, it is the contrary, my goal was not to change the checks.
If I follow this proposal:
1. Starting with a current service and a not empty config timeserver list,
but in manual mode, we have timerservers_list == NULL
-> ts_service = NULL
and timeserver_sync_start() is not called, as we bail out.
2. Switching to auto mode, we have ts_service == NULL
-> no synchro in __connman_timeserver_sync()
and since timeserver_sync_start() has never be called nothing will happen.
ts_service should really only be touched right before we call
timeserver_sync_start() and set to NULL as soon we stop the
The return timeservers_list should contain all server we should poll.
This sounds like __connman_timeserver_get_all() should return
a valid list.