widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #17536
[Merge] lp:~widelands-dev/widelands/bug-1830376-lanless-lan-game into lp:widelands
Notabilis has proposed merging lp:~widelands-dev/widelands/bug-1830376-lanless-lan-game into lp:widelands.
Commit message:
Use the loopback network interface for LAN announcements.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1830376 in widelands: "Unable to start local multiplayer without internet connection"
https://bugs.launchpad.net/widelands/+bug/1830376
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1830376-lanless-lan-game/+merge/368231
Allow the loopback network interface for LAN announcements, making it possible to use the LAN mode locally even when the network is disconnected.
Bonus fix: LAN games running on the same host now appear in the LAN lobby.
Also fixing missing whitespace in two error messages.
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1830376-lanless-lan-game into lp:widelands.
=== modified file 'src/network/network_lan_promotion.cc'
--- src/network/network_lan_promotion.cc 2019-02-23 11:00:49 +0000
+++ src/network/network_lan_promotion.cc 2019-06-01 17:22:12 +0000
@@ -102,7 +102,7 @@
for (ifa = ifaddr, n = 0; ifa != nullptr; ifa = ifa->ifa_next, n++) {
if (ifa->ifa_addr == nullptr)
continue;
- if (!(ifa->ifa_flags & IFF_BROADCAST) && !(ifa->ifa_flags & IFF_MULTICAST))
+ if (!(ifa->ifa_flags & IFF_LOOPBACK) && !(ifa->ifa_flags & IFF_BROADCAST) && !(ifa->ifa_flags & IFF_MULTICAST))
continue;
switch (ifa->ifa_addr->sa_family) {
case AF_INET:
@@ -291,7 +291,7 @@
// Remove this interface id from the set
it = interface_indices_v6.erase(it);
if (interface_indices_v6.empty()) {
- log("[LAN] Warning: No more multicast capable IPv6 interfaces."
+ log("[LAN] Warning: No more multicast capable IPv6 interfaces. "
"Other LAN players won't find your game.\n");
}
} else {
@@ -359,7 +359,7 @@
throw WLWarning(_("Failed to use the local network!"),
/** TRANSLATORS: %s is a list of alternative ports with "or" */
_("Widelands was unable to use the local network. "
- "Maybe some other process is already running a server on port %s"
+ "Maybe some other process is already running a server on port %s "
"or your network setup is broken."),
i18n::localize_list(ports_list, i18n::ConcatenateWith::OR).c_str());
}
Follow ups