Fix: Connect timeout arithmetic in inet/inet6 (v4)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Nov 2018 17:12:20 +0000 (12:12 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 25 Jun 2019 15:16:07 +0000 (11:16 -0400)
commit9cc0ed0d6d8ed76fd453adb1dd4276e94ee8590a
treea03ffb31ac54c2839d75e4989599d7d405d820b1
parentaa95faca6cb7a9af8ef2edf696a296b0eac6704c
Fix: Connect timeout arithmetic in inet/inet6 (v4)

The nanoseconds part of the timespec struct time_a is not always
bigger than time_b since it wraps around each second.

Use 64-bit arithmetic to compute the difference.

Merge/move duplicated code into utils.c.

This function is really doing two things. Split it into
timespec_to_ms() and timespec_abs_diff().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/common.h
src/common/sessiond-comm/inet.c
src/common/sessiond-comm/inet6.c
src/common/time.h
src/common/utils.c
This page took 0.026785 seconds and 5 git commands to generate.