[wesnoth-commits] [wesnoth/wesnoth] 318a62: campaignd: Explicitly check for before= and after=...

GitHub noreply at github.com
Wed Jan 16 23:38:01 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 318a6242ee855bca754404ad369d39069e4c594d
      https://github.com/wesnoth/wesnoth/commit/318a6242ee855bca754404ad369d39069e4c594d
  Author: Iris Morelle <shadowm at wesnoth.org>
  Date:   2019-01-16 (Wed, 16 Jan 2019)

  Changed paths:
    M src/campaign_server/campaign_server.cpp

  Log Message:
  -----------
  campaignd: Explicitly check for before= and after= in add-ons list requests

A regression introduced in e2a64541002f0b4ee885f699c4f0901e441f938a
causes the timestamp-based list filtering to be forcibly enabled in ALL
cases because the author missed that the old code would bail out due to
lexical_cast() throwing an exception if the provided input was empty,
such as when before/after aren't provided in the list request. As a
result, the add-ons list would come up empty for clients because nothing
was matching the resulting time criteria.

The old pattern was a bit oblique to say the least, so I decided it'd be
best to replace it with an explicit check for the attributes' existence
and contents.



      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list