diff --git a/overlay_route.c b/overlay_route.c index 6561e3f6..0a02ac6f 100644 --- a/overlay_route.c +++ b/overlay_route.c @@ -519,7 +519,6 @@ int overlay_route_recalc_node_metrics(overlay_node *n, time_ms_t now) break; case REACHABLE_BROADCAST: n->subscriber->interface = interface; - n->subscriber->address = interface->broadcast_address; break; } n->best_link_score=best_score; @@ -528,6 +527,8 @@ int overlay_route_recalc_node_metrics(overlay_node *n, time_ms_t now) if (old_best && !best_score){ INFOF("PEER UNREACHABLE, sid=%s", alloca_tohex_sid(n->subscriber->sid)); + overlay_send_probe(n->subscriber, n->subscriber->address, n->subscriber->interface); + }else if(best_score && !old_best){ INFOF("PEER REACHABLE, sid=%s", alloca_tohex_sid(n->subscriber->sid)); /* Make sure node is advertised soon */ diff --git a/rhizome_fetch.c b/rhizome_fetch.c index 9f830e6b..90f073f2 100644 --- a/rhizome_fetch.c +++ b/rhizome_fetch.c @@ -1346,7 +1346,6 @@ int rhizome_write_content(struct rhizome_fetch_slot *slot, char *buffer, int byt rhizome_fetch_close(slot); RETURN(-1); } else { - time_ms_t start=gettime_ms(); int ret=sqlite_exec_void_retry(&retry, "UPDATE FILES SET datavalid=1 WHERE id='%s'", slot->manifest->fileHexHash); diff --git a/rhizome_packetformats.c b/rhizome_packetformats.c index 61dad8ba..cd54d77d 100644 --- a/rhizome_packetformats.c +++ b/rhizome_packetformats.c @@ -117,7 +117,6 @@ long long rhizome_bar_version(unsigned char *bar) { long long version=0; int i; - // for(i=0;i<7;i++) bar[8+6-i]=(m->version>>(8*i))&0xff; for(i=0;i<7;i++) version|=bar[RHIZOME_BAR_VERSION_OFFSET+6-i]<<(8LL*i); return version; }