Avoid calling time(NULL).
[tinc] / src / protocol_misc.c
index 7617091..a4ad73d 100644 (file)
@@ -89,7 +89,7 @@ bool termreq_h(connection_t *c, const char *request) {
 
 bool send_ping(connection_t *c) {
        c->status.pinged = true;
-       c->last_ping_time = time(NULL);
+       c->last_ping_time = now.tv_sec;
 
        return send_request(c, "%d", PING);
 }