[Commits] [wesnoth/wesnoth] 015338: use shared_ptr for wesnothd_connection

GitHub noreply at github.com
Tue Jun 13 14:18:09 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 015338a1bb3b2da60b69f4d63160787f757e32f6
      https://github.com/wesnoth/wesnoth/commit/015338a1bb3b2da60b69f4d63160787f757e32f6
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M src/game_initialization/multiplayer.cpp
    M src/gui/dialogs/network_transmission.cpp
    M src/gui/dialogs/network_transmission.hpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  use shared_ptr for wesnothd_connection


  Commit: 36f19f75721c44fb96aefed8281aac3a8eb147ff
      https://github.com/wesnoth/wesnoth/commit/36f19f75721c44fb96aefed8281aac3a8eb147ff
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M src/game_initialization/multiplayer.cpp
    M src/gui/dialogs/network_transmission.cpp
    M src/gui/dialogs/network_transmission.hpp
    M src/tests/gui/test_gui2.cpp
    M src/wesnothd_connection.cpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  use a worker thread to send packages in wesnothd_connection

fixes #1674
This fixed a problem where at game start the host sends first a [scenario_diff]
and then a [start_game] but then the host loads the scenario config and
wesnothd_connection::poll isn't called while the loadingscreen is showing. so
the other players receive the [start_game] with a lot delay since
wesnothd_connection won't send it before the the loadingscreen has finished.

This isn't finished yet. In particular i still have to figure out how to
handle (network) exceptions here.


  Commit: 50294e8b1e4a81c1c6b4d9bf2ca69c77a8405a80
      https://github.com/wesnoth/wesnoth/commit/50294e8b1e4a81c1c6b4d9bf2ca69c77a8405a80
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M src/wesnothd_connection.cpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  fix error handling in wesnothd_connection


  Commit: a034f5c9f748086cb9a08a5ba12b1f15723cc798
      https://github.com/wesnoth/wesnoth/commit/a034f5c9f748086cb9a08a5ba12b1f15723cc798
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M src/wesnothd_connection.cpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  more mutexes for wesnothd_connection


  Commit: c7c9ed390faa7ee68cb7c78c221ba822b1b0dc85
      https://github.com/wesnoth/wesnoth/commit/c7c9ed390faa7ee68cb7c78c221ba822b1b0dc85
  Author: gfgtdf <daniel.gfgtdf at gmail.com>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M src/game_initialization/multiplayer.cpp
    M src/gui/dialogs/network_transmission.cpp
    M src/gui/dialogs/network_transmission.hpp
    M src/tests/gui/test_gui2.cpp
    M src/wesnothd_connection.cpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  use a worker thread to send packages in wesnothd_connection, fixes #1674 

Merges pull request #1775

fixes #1674
This fixed a problem where at game start the host sends first a [scenario_diff]
and then a [start_game] but then the host loads the scenario config (during loadingscreen before game) and
wesnothd_connection::poll isn't called while the loadingscreen is showing. so
the other players receive the [start_game] with a lot delay since
wesnothd_connection won't send it before the the loadingscreen has finished.

An alterntive fix woudl be calling poll() regulary from inside the drawing (gui2 and gamemap) code. But this way seemed eariler since i don't have to touch the drawing code .


Compare: https://github.com/wesnoth/wesnoth/compare/73f1541e813b...c7c9ed390faa


More information about the Commits mailing list