[wesnoth-commits] [wesnoth/wesnoth] 201899: campaignd: Some code clean-up

Iris Morelle noreply at github.com
Tue Nov 17 22:50:44 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 2018990b62ddcebfd5d44a686df4680be5a10376
      https://github.com/wesnoth/wesnoth/commit/2018990b62ddcebfd5d44a686df4680be5a10376
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M src/server/campaignd/server.cpp

  Log Message:
  -----------
  campaignd: Some code clean-up


  Commit: 352cbc32ec7007c8340be43eab37cf554ed2ec3c
      https://github.com/wesnoth/wesnoth/commit/352cbc32ec7007c8340be43eab37cf554ed2ec3c
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M src/server/campaignd/server.cpp

  Log Message:
  -----------
  campaignd: Refactor [request_campaign]

This makes the code easier to follow, hopefully, and quite importantly
avoids an unnecessary copy while building the update pack sequence.

It does away with the size report for deltas in stderr because it's
inaccurate by design -- it's the sum of the individual packs' compressed
sizes rather than the size of the compressed result (which we cannot
determine in advance.)

While testing this I ran into an issue where apparently someone didn't
implement the from/to version logic for the update pack sequence, who
knew. Gotta fix that later I reckon.


  Commit: fbf472f1b4c6162b9c73c340f480fb9f66ba8a47
      https://github.com/wesnoth/wesnoth/commit/fbf472f1b4c6162b9c73c340f480fb9f66ba8a47
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M src/server/campaignd/server.cpp

  Log Message:
  -----------
  campaignd: Implement client-specified update target in [request_campaign]

The previous implementation here didn't actually use the from/to version
bounds when building the delta pack sequence. So... let's fix that so
people aren't forced to receive a bogus delta that invariably contains
the changes from the earliest uploaded version to the latest.


Compare: https://github.com/wesnoth/wesnoth/compare/d30b3eccb82a...fbf472f1b4c6



More information about the Commits mailing list