Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 4d87a354 authored by rswindell's avatar rswindell

Move nearest_sysfaddr() from fido.cpp to msg_id.c since it's needed by...

Move nearest_sysfaddr() from fido.cpp to msg_id.c since it's needed by anything that uses msg_id.c now (e.g. SBBSecho, which doesn't link fido.cpp).
parent 9798e647
......@@ -130,16 +130,3 @@ faddr_t atofaddr(scfg_t* cfg, char *str)
addr.point=atoi(p+1);
return(addr);
}
uint nearest_sysfaddr(scfg_t* cfg, faddr_t* dest_addr)
{
uint i;
for(i=0; i<cfg->total_faddrs; i++)
if(dest_addr->zone == cfg->faddr[i].zone && dest_addr->net == cfg->faddr[i].net)
return i;
for(i=0; i<cfg->total_faddrs; i++)
if(dest_addr->zone == cfg->faddr[i].zone)
return i;
return 0;
}
......@@ -260,3 +260,16 @@ char* DLLCALL msg_program_id(char* pid, size_t maxlen)
,__DATE__,compiler);
return pid;
}
uint nearest_sysfaddr(scfg_t* cfg, faddr_t* dest_addr)
{
uint i;
for(i=0; i<cfg->total_faddrs; i++)
if(dest_addr->zone == cfg->faddr[i].zone && dest_addr->net == cfg->faddr[i].net)
return i;
for(i=0; i<cfg->total_faddrs; i++)
if(dest_addr->zone == cfg->faddr[i].zone)
return i;
return 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment