projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Assign more suitable types and fix narrowing conversion warns.
[tinc]
/
src
/
net_socket.c
diff --git
a/src/net_socket.c
b/src/net_socket.c
index
05ee3b1
..
40671db
100644
(file)
--- a/
src/net_socket.c
+++ b/
src/net_socket.c
@@
-25,10
+25,8
@@
#include "address_cache.h"
#include "conf.h"
#include "connection.h"
#include "address_cache.h"
#include "conf.h"
#include "connection.h"
-#include "control_common.h"
#include "list.h"
#include "logger.h"
#include "list.h"
#include "logger.h"
-#include "meta.h"
#include "names.h"
#include "net.h"
#include "netutl.h"
#include "names.h"
#include "net.h"
#include "netutl.h"
@@
-706,8
+704,8
@@
void handle_new_meta_connection(void *data, int flags) {
static sockaddr_t prev_sa;
if(!sockaddrcmp_noport(&sa, &prev_sa)) {
static sockaddr_t prev_sa;
if(!sockaddrcmp_noport(&sa, &prev_sa)) {
- static
in
t samehost_burst;
- static
in
t samehost_burst_time;
+ static
time_
t samehost_burst;
+ static
time_
t samehost_burst_time;
if(now.tv_sec - samehost_burst_time > samehost_burst) {
samehost_burst = 0;
if(now.tv_sec - samehost_burst_time > samehost_burst) {
samehost_burst = 0;
@@
-728,8
+726,8
@@
void handle_new_meta_connection(void *data, int flags) {
// Check if we get many connections from different hosts
// Check if we get many connections from different hosts
- static
in
t connection_burst;
- static
in
t connection_burst_time;
+ static
time_
t connection_burst;
+ static
time_
t connection_burst_time;
if(now.tv_sec - connection_burst_time > connection_burst) {
connection_burst = 0;
if(now.tv_sec - connection_burst_time > connection_burst) {
connection_burst = 0;
@@
-866,6
+864,8
@@
void try_outgoing_connections(void) {
node_add(n);
}
node_add(n);
}
+ free(name);
+
outgoing->node = n;
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing, true);
outgoing->node = n;
list_insert_tail(outgoing_list, outgoing);
setup_outgoing_connection(outgoing, true);