projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove global variable "now".
[tinc]
/
src
/
net_socket.c
diff --git
a/src/net_socket.c
b/src/net_socket.c
index
5394d36
..
287d688
100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-234,7
+234,7
@@
int setup_vpn_in_socket(const sockaddr_t *sa)
}
static void retry_outgoing_handler(int fd, short events, void *data) {
}
static void retry_outgoing_handler(int fd, short events, void *data) {
-
retry_outgoing
(data);
+
do_outgoing_connection
(data);
}
void retry_outgoing(outgoing_t *outgoing) {
}
void retry_outgoing(outgoing_t *outgoing) {
@@
-261,7
+261,8
@@
void finish_connecting(connection_t *c)
configure_tcp(c);
configure_tcp(c);
- c->last_ping_time = now;
+ c->last_ping_time = time(NULL);
+ c->status.connecting = false;
send_id(c);
}
send_id(c);
}
@@
-390,7
+391,7
@@
void setup_outgoing_connection(outgoing_t *outgoing)
}
c->outgoing = outgoing;
}
c->outgoing = outgoing;
- c->last_ping_time =
now
;
+ c->last_ping_time =
time(NULL)
;
connection_add(c);
connection_add(c);
@@
-436,7
+437,7
@@
void handle_new_meta_connection(int sock, short events, void *data)
c->address = sa;
c->hostname = sockaddr2hostname(&sa);
c->socket = fd;
c->address = sa;
c->hostname = sockaddr2hostname(&sa);
c->socket = fd;
- c->last_ping_time =
now
;
+ c->last_ping_time =
time(NULL)
;
ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection from %s"), c->hostname);
ifdebug(CONNECTIONS) logger(LOG_NOTICE, _("Connection from %s"), c->hostname);