projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix warnings for functions marked __attribute((warn_unused_result)).
[tinc]
/
src
/
net_socket.c
diff --git
a/src/net_socket.c
b/src/net_socket.c
index
0ee3655
..
1b49aee
100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-294,7
+294,7
@@
void retry_outgoing(outgoing_t *outgoing) {
void finish_connecting(connection_t *c) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Connected to %s (%s)", c->name, c->hostname);
void finish_connecting(connection_t *c) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Connected to %s (%s)", c->name, c->hostname);
- c->last_ping_time =
time(NULL)
;
+ c->last_ping_time =
now.tv_sec
;
c->status.connecting = false;
send_id(c);
c->status.connecting = false;
send_id(c);
@@
-508,7
+508,7
@@
begin:
c->outdigest = myself->connection->outdigest;
c->outmaclength = myself->connection->outmaclength;
c->outcompression = myself->connection->outcompression;
c->outdigest = myself->connection->outdigest;
c->outmaclength = myself->connection->outmaclength;
c->outcompression = myself->connection->outcompression;
- c->last_ping_time =
time(NULL)
;
+ c->last_ping_time =
now.tv_sec
;
connection_add(c);
connection_add(c);
@@
-571,7
+571,7
@@
void handle_new_meta_connection(void *data, int flags) {
c->address = sa;
c->hostname = sockaddr2hostname(&sa);
c->socket = fd;
c->address = sa;
c->hostname = sockaddr2hostname(&sa);
c->socket = fd;
- c->last_ping_time =
time(NULL)
;
+ c->last_ping_time =
now.tv_sec
;
logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Connection from %s", c->hostname);
logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Connection from %s", c->hostname);
@@
-610,7
+610,7
@@
void handle_new_unix_connection(void *data, int flags) {
c->address = sa;
c->hostname = xstrdup("localhost port unix");
c->socket = fd;
c->address = sa;
c->hostname = xstrdup("localhost port unix");
c->socket = fd;
- c->last_ping_time =
time(NULL)
;
+ c->last_ping_time =
now.tv_sec
;
logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Connection from %s", c->hostname);
logger(DEBUG_CONNECTIONS, LOG_NOTICE, "Connection from %s", c->hostname);
@@
-674,7
+674,7
@@
void try_outgoing_connections(void) {
}
if(!found) {
}
if(!found) {
- outgoing_t *outgoing = x
malloc_and_zero
(sizeof *outgoing);
+ outgoing_t *outgoing = x
zalloc
(sizeof *outgoing);
outgoing->name = name;
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing);
outgoing->name = name;
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing);