Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-10 Thread GunChleoc
> SirVer: we need a command "fail" in the debugconsole,
to trigger an assert that will kind of kill such a game.

Can you open a bug report and give more details on what we need? Once a merge 
request is merged, chances are small that SirVer will look at the comments a 
all ;)
-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-09 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/internet-gaming-reset into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
-- 
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-09 Thread Klaus Halfmann
Review: Approve testplay

Did some more "real" testing with Notablis,
all as stable as it can be.

SirVer: we need a command "fail" in the debugconsole,
to trigger an assert that will kind of kill such a game.

Meanwhile we had kind of fun with switchplayer :-)

@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-09 Thread Klaus Halfmann
OK, I should have a bit of time today, lets try around 17:00 CET.

Well if they loby is useless in such a situation we should either:
* try to reconnect in the lobby and show the user some response.
* completey drop out to the main menu.

With the first option we may loose some lobby messages, that may have been 
important.
Like "I was dropped out of the game as my Mother pulled then WLAN cable" ;-)

-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-08 Thread Notabilis
Thanks for testing. A test game does not make sense for this branch. But if you 
want to do one anyway, I have time this evening.

What do you mean with "coming back into the lobby"? Have you been in the main 
menu and clicked on Internet Gaming again?

The empty lobby after the disconnect is an old ... feature. In the chat window 
should have been a message that you are no longer connected to the metaserver. 
Not being connected makes the lobby window completely useless as far as I am 
aware. Do you think the user should be dropped to the main menu instead? Should 
be possible to do, I just don't know why it hasn't been implemented that way.
-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-08 Thread Klaus Halfmann
Review: Approve

Hmm, I pulled the cable during game and got e.g.

[sync] Reset
InternetGaming: Game update on metaserver.
...
InternetGaming: Connecting to the metaserver.
Could not resolve network name: resolve: Host not found (authoritative)
InternetGaming: Sending login request.
InternetGaming: No answer from metaserver!
InternetGaming: logout(Der Metaserver hat nicht geantwortet)
[NetClient] Closing network socket connected to 
2a01:238:4326:5100:b5ce:5c0b:f1f4:2e40:7395.
...
NetRelayConnection] Closing network socket connected to 
2a01:238:4326:5100:b5ce:5c0b:f1f4:2e40:7397.

I then re-plugged the cable.

coming back into the lobby it was empty ...

trying to open a new game failed (could not connect to IP address or such)

was ok again after leaving the lobby.

Switched off IPv4, no change as I was on IPv6.
Switched off IPv6, same result as above.
Reconnected via Ipv4, all fine.

For me this can go in unless we need some more testing?

We could have a "real" Network game to test some ore things.
(e.g. mix of IPv4 and 6 on both side) 
Notabilis: please propose a Date

-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/internet-gaming-reset.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-06 Thread Klaus Halfmann
looks straigghtforward. Will compile this and the do som stresstest,
e.g. pulling the cable at strange moments :-)
-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-04 Thread bunnybot
Continuous integration builds have changed state:

Travis build 3137. State: passed. Details: 
https://travis-ci.org/widelands/widelands/builds/337190809.
Appveyor build 2944. State: success. Details: 
https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_internet_gaming_reset-2944.
-- 
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands

2018-02-04 Thread Notabilis
Notabilis has proposed merging 
lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands.

Commit message:
Resetting the local state of the internet gaming when logging into the 
metaserver.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/internet-gaming-reset/+merge/337129

Resetting the local state of the internet gaming when logging into the 
metaserver.
Currently, this is only done on logout. If the game jumps to the main menu due 
to other reasons (timeout, exception, ...) the state is not reset, resulting in 
a wrong state of the lobby after logging in again.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/internet-gaming-reset into lp:widelands.
=== modified file 'src/network/internet_gaming.cc'
--- src/network/internet_gaming.cc	2018-01-29 00:09:28 +
+++ src/network/internet_gaming.cc	2018-02-04 11:48:39 +
@@ -102,7 +102,6 @@
 	// First of all try to connect to the metaserver
 	log("InternetGaming: Connecting to the metaserver.\n");
 	NetAddress addr;
-	net.reset();
 	if (NetAddress::resolve_to_v6(, meta_, port_)) {
 		net = NetClient::connect(addr);
 	}
@@ -127,6 +126,10 @@
const std::string& meta,
uint32_t port) {
 
+	// Reset local state. Only resetting on logout() or error isn't enough since
+	// the game might jump to the main menu from other places, too
+	reset();
+
 	clientname_ = nick;
 	reg_ = registered;
 	meta_ = meta;

=== modified file 'src/network/netrelayconnection.cc'
--- src/network/netrelayconnection.cc	2017-12-17 14:45:23 +
+++ src/network/netrelayconnection.cc	2018-02-04 11:48:39 +
@@ -291,7 +291,7 @@
 	assert(host.is_valid());
 	const boost::asio::ip::tcp::endpoint destination(host.ip, host.port);
 
-	log("[NetRelayConnection]: Trying to connect to %s:%u ... ", host.ip.to_string().c_str(),
+	log("[NetRelayConnection] Trying to connect to %s:%u ... ", host.ip.to_string().c_str(),
 	host.port);
 	boost::system::error_code ec;
 	socket_.connect(destination, ec);

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp