[LinuxPPS] Missing test in __sys_time_pps_fetch

clemens at dwf.com clemens at dwf.com
Sun Jul 1 07:45:34 CEST 2007


I am not sure of the logic in __sys_time_pps_fetch, but it does not
seem to agree with the RFC.

First, the RFC allows the pointer to the timeout time to be NULL.
I see no check for this case.

Second, you have a test on

    if (timeout->tv_sec != -1) {

which I dont understand at all, perhaps its something internal.

I would consider a NEGATIVE timeout to be an error, tho one could
just as easily consider it equal zero.  In any case I dont
undertand what a test against -1 in ts_sec would mean.

So, the 2nd item is probably a misunderstanding of your code,
but the 1st should be fixed.

-- 
                                        Reg.Clemens
                                        reg at dwf.com





More information about the LinuxPPS mailing list