Platform/Menu: Migration of Server_IsLan() into the master-server related code
This commit is contained in:
parent
4600a03165
commit
cca461effe
3 changed files with 15 additions and 3 deletions
|
@ -165,8 +165,7 @@ inet_refreshframe(void)
|
|||
|
||||
address = gethostcachestring(srv_fldAdress, i);
|
||||
|
||||
/* skip LAN */
|
||||
if (!address || Server_IsLan(address)) {
|
||||
if (!address) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ lan_refreshframe(void)
|
|||
string ping;
|
||||
|
||||
address = gethostcachestring(srv_fldAdress, i);
|
||||
if (!address || !Server_IsLan(address)) {
|
||||
|
||||
if (!address) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,18 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
static bool
|
||||
Server_IsLan(string address)
|
||||
{
|
||||
tokenizebyseparator(address, ".");
|
||||
|
||||
if (argv(0) == "192" && argv(1) == "168") {
|
||||
return (1);
|
||||
} else {
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
string
|
||||
Master_Resolve(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue