diff options
author | madpilot <madpilot@FreeBSD.org> | 2017-09-15 01:29:06 +0800 |
---|---|---|
committer | madpilot <madpilot@FreeBSD.org> | 2017-09-15 01:29:06 +0800 |
commit | de9e39b2031f4132d5cff6f338f44eb3b7866f15 (patch) | |
tree | e61deae048d7476b7d176a7dceeb246d4f811cd3 /games/0ad | |
parent | 3b978b9c6c7e36575a6b63cf4ae365c062cd9ade (diff) | |
download | freebsd-ports-gnome-de9e39b2031f4132d5cff6f338f44eb3b7866f15.tar.gz freebsd-ports-gnome-de9e39b2031f4132d5cff6f338f44eb3b7866f15.tar.zst freebsd-ports-gnome-de9e39b2031f4132d5cff6f338f44eb3b7866f15.zip |
Update patch with better one provided upstream.
Obtained from: https://trac.wildfiregames.com/changeset/19947
Diffstat (limited to 'games/0ad')
-rw-r--r-- | games/0ad/Makefile | 2 | ||||
-rw-r--r-- | games/0ad/files/patch-source_lobby_XmppClient.cpp | 29 |
2 files changed, 25 insertions, 6 deletions
diff --git a/games/0ad/Makefile b/games/0ad/Makefile index 4080c7a6b42a..fad694b52b68 100644 --- a/games/0ad/Makefile +++ b/games/0ad/Makefile @@ -2,7 +2,7 @@ PORTNAME= 0ad PORTVERSION= 0.0.22 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= http://releases.wildfiregames.com/ \ SF/zero-ad/releases diff --git a/games/0ad/files/patch-source_lobby_XmppClient.cpp b/games/0ad/files/patch-source_lobby_XmppClient.cpp index a3d74e0b0573..d795d910536b 100644 --- a/games/0ad/files/patch-source_lobby_XmppClient.cpp +++ b/games/0ad/files/patch-source_lobby_XmppClient.cpp @@ -1,11 +1,30 @@ ---- source/lobby/XmppClient.cpp.orig 2017-07-28 19:57:26 UTC +--- source/lobby/XmppClient.cpp.orig 2017-06-18 18:48:18 UTC +++ source/lobby/XmppClient.cpp -@@ -955,7 +955,7 @@ std::time_t XmppClient::ComputeTimestamp(const glooxwr - if (!strptime(timestampStr.c_str(), "%Y-%m-%dT%H:%M:%SZ", ×tamp)) - LOGERROR("Received delayed message with corrupted timestamp %s", timestampStr.to_string()); +@@ -25,10 +25,6 @@ + #include "i18n/L10n.h" + +-#if OS_WIN +-#include "lib/sysdep/os/win/wposix/wtime.h" +-#endif +- + #include "lib/external_libraries/enet.h" + #include "lib/utf8.h" + #include "network/NetServer.h" +@@ -948,14 +944,8 @@ std::time_t XmppClient::ComputeTimestamp(const glooxwr + if (!msg.when()) + return std::time(nullptr); + +- glooxwrapper::string timestampStr = msg.when()->stamp(); +- struct tm timestamp = {0}; +- +- // See http://xmpp.org/extensions/xep-0082.html#sect-idp285136 for format +- if (!strptime(timestampStr.c_str(), "%Y-%m-%dT%H:%M:%SZ", ×tamp)) +- LOGERROR("Received delayed message with corrupted timestamp %s", timestampStr.to_string()); +- - return std::mktime(×tamp) - timezone; -+ return std::mktime(×tamp); ++ // See XEP-0082 for the date format ++ return g_L10n.ParseDateTime(msg.when()->stamp().to_string(), "Y-M-d'T'H:m:sZ", Locale::getUS()) / 1000.0; } /** |