projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clear connection options and status fields in free_connection_partially().
[tinc]
/
src
/
connection.c
diff --git
a/src/connection.c
b/src/connection.c
index
29ad04e
..
0293100
100644
(file)
--- a/
src/connection.c
+++ b/
src/connection.c
@@
-83,9
+83,21
@@
void free_connection_partially(connection_t *c) {
c->socket = -1;
c->socket = -1;
+ c->options = 0;
+ c->status.pinged = false;
+ c->status.connecting = false;
+ c->status.encryptout = false;
+ c->status.decryptin = false;
+ c->status.mst = false;
+ c->status.control = false;
+ c->status.pcap = false;
+ c->status.log = false;
+
c->protocol_major = 0;
c->protocol_minor = 0;
c->allow_request = 0;
c->protocol_major = 0;
c->protocol_minor = 0;
c->allow_request = 0;
+ c->tcplen = 0;
+ c->last_ping_time = 0;
}
void free_connection(connection_t *c) {
}
void free_connection(connection_t *c) {
@@
-117,7
+129,7
@@
bool dump_connections(connection_t *cdump) {
for(node = connection_tree->head; node; node = node->next) {
c = node->data;
for(node = connection_tree->head; node; node = node->next) {
c = node->data;
- send_request(cdump, "%d %d %s
at %s options %x socket %d status %04
x",
+ send_request(cdump, "%d %d %s
%s %x %d %
x",
CONTROL, REQ_DUMP_CONNECTIONS,
c->name, c->hostname, c->options, c->socket,
bitfield_to_int(&c->status, sizeof c->status));
CONTROL, REQ_DUMP_CONNECTIONS,
c->name, c->hostname, c->options, c->socket,
bitfield_to_int(&c->status, sizeof c->status));