Merge pull request #5 from AiyionPrime/thkr-1.1-ponyhof

This commit is contained in:
Rafał Leśniak 2017-01-30 20:02:26 +01:00 committed by GitHub
commit 8e0e0aea5f
3 changed files with 4 additions and 4 deletions

View file

@ -747,8 +747,8 @@ static void send_everything(connection_t *c) {
for splay_each(node_t, n, node_tree) { for splay_each(node_t, n, node_tree) {
if ((!n->status.reachable) && ((now.tv_sec - n->last_state_change) >= keylifetime*2)) { if ((!n->status.reachable) && ((now.tv_sec - n->last_state_change) >= keylifetime*2)) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to %s (%zu / %d)", n->name, logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to %s (%lf / %d)", n->name,
c->name, now.tv_sec - n->last_state_change, keylifetime); c->name, difftime(now.tv_sec, n->last_state_change), keylifetime);
continue; continue;
} }

View file

@ -100,7 +100,7 @@ bool send_ping(connection_t *c) {
c->status.pinged = true; c->status.pinged = true;
c->last_ping_time = now; c->last_ping_time = now;
return send_request(c, "%d %zu %ld", PING, c->last_ping_time.tv_sec, c->last_ping_time.tv_usec); return send_request(c, "%d %zu %ld", PING, (size_t)c->last_ping_time.tv_sec, c->last_ping_time.tv_usec);
} }
bool ping_h(connection_t *c, const char *request) { bool ping_h(connection_t *c, const char *request) {

View file

@ -120,7 +120,7 @@ bool add_subnet_h(connection_t *c, const char *request) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s", logger(DEBUG_ALWAYS, LOG_WARNING, "Ignoring unauthorized %s from %s (%s): %s",
"ADD_SUBNET", c->name, c->hostname, subnetstr); "ADD_SUBNET", c->name, c->hostname, subnetstr);
if ((!owner->status.reachable) && ((now.tv_sec - owner->last_state_change) >= keylifetime*2)) { if ((!owner->status.reachable) && ((now.tv_sec - owner->last_state_change) >= keylifetime*2)) {
logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to ALL (%zu / %d)", owner->name, now.tv_sec - owner->last_state_change, keylifetime); logger(DEBUG_CONNECTIONS, LOG_INFO, "Not forwarding informations about %s to ALL (%lf / %d)", owner->name, difftime(now.tv_sec, owner->last_state_change), keylifetime);
} else { } else {
forward_request(c, request); forward_request(c, request);
} }