Skip to content
Snippets Groups Projects
Commit 4d87a354 authored by rswindell's avatar rswindell
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment