mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-19 05:07:56 +00:00
Minor code cleanup
This commit is contained in:
parent
f41830ebfb
commit
0f81c1f641
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user