Commit 732716d5 authored by rswindell's avatar rswindell

Make sysfaddr() a C function (not a sbbs_t member function) and rename to

nearest_sysfaddr().
parent feda3066
......@@ -131,15 +131,15 @@ faddr_t atofaddr(scfg_t* cfg, char *str)
return(addr);
}
uint sbbs_t::sysfaddr(faddr_t dest_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)
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)
for(i=0; i<cfg->total_faddrs; i++)
if(dest_addr->zone == cfg->faddr[i].zone)
return i;
return 0;
}
......@@ -1081,7 +1081,6 @@ public:
bool inetmail(const char *into, const char *subj = NULL, long mode = WM_NONE, smb_t* resmb = NULL, smbmsg_t* remsg = NULL, str_list_t cc = NULL);
bool qnetmail(const char *into, const char *subj = NULL, long mode = WM_NONE, smb_t* resmb = NULL, smbmsg_t* remsg = NULL);
uint sysfaddr(faddr_t dest_addr);
/* useredit.cpp */
void useredit(int usernumber);
......@@ -1233,6 +1232,9 @@ extern "C" {
DLLEXPORT BOOL DLLCALL add_reply_ids(scfg_t*, smb_t*, smbmsg_t*, smbmsg_t* remsg);
DLLEXPORT char* DLLCALL msg_program_id(char* pid, size_t);
/* fido.cpp */
DLLEXPORT uint nearest_sysfaddr(scfg_t*, faddr_t* dest_addr);
/* date_str.c */
DLLEXPORT char * DLLCALL zonestr(short zone);
DLLEXPORT time32_t DLLCALL dstrtounix(scfg_t*, const char *str);
......
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