NCS 3.0.0: sntp: sntp_simple_helper bug when timeout SYS_FOREVER_MS

Hi,

Using NCS 3.0.0 it would appear that the function sntp_simple_helper does not work with SYS_FOREVER_MS as a timeout value.

Problem:
When we pass this value as a timeout, it is assigned to a uint64_t variable called deadline.  The following while loop will then actually pass the deadline after ~49.7 days.

Additionally, the return value of rtn = ETIMEDOUT looks suspicious.  I think it should be negated on return.

Can this be fixed for the next NCS release?

I have attached a patch that we are currently applying locally....

Thanks!

0007-Fix-for-can-t-use-SYS_FOREVER_MS.patch

Related