[lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Jonathan Rajotte
The nanoseconds part of the timespec struct time_a is not always bigger than time_b since it wrap around each seconds. Use the absolute value of the nanosecond difference to perform unsigned long operation. Signed-off-by: Jonathan Rajotte --- src/common/sessiond-comm/inet.c | 2 +- src/common/

Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Simon Marchi
On 2018-11-08 17:08, Jonathan Rajotte wrote: The nanoseconds part of the timespec struct time_a is not always bigger than time_b since it wrap around each seconds. Use the absolute value of the nanosecond difference to perform unsigned long operation. Signed-off-by: Jonathan Rajotte --- src/c

Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Simon Marchi
On 2018-11-08 17:17, Simon Marchi wrote: On 2018-11-08 17:08, Jonathan Rajotte wrote: The nanoseconds part of the timespec struct time_a is not always bigger than time_b since it wrap around each seconds. Use the absolute value of the nanosecond difference to perform unsigned long operation. S

Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Jonathan Rajotte-Julien
You are right...Might have been looking to long at logs all day. Thanks for pointing it out. Will send v2 shortly. On Thu, Nov 08, 2018 at 05:26:39PM -0500, Simon Marchi wrote: > On 2018-11-08 17:17, Simon Marchi wrote: > > On 2018-11-08 17:08, Jonathan Rajotte wrote: > > > The nanoseconds part