Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2017 17:29:06 +0000 (UTC)
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r449842 - in head/games/0ad: . files
Message-ID:  <201709141729.v8EHT65v019700@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: madpilot
Date: Thu Sep 14 17:29:06 2017
New Revision: 449842
URL: https://svnweb.freebsd.org/changeset/ports/449842

Log:
  Update patch with better one provided upstream.
  
  Obtained from:	https://trac.wildfiregames.com/changeset/19947

Modified:
  head/games/0ad/Makefile
  head/games/0ad/files/patch-source_lobby_XmppClient.cpp

Modified: head/games/0ad/Makefile
==============================================================================
--- head/games/0ad/Makefile	Thu Sep 14 17:17:53 2017	(r449841)
+++ head/games/0ad/Makefile	Thu Sep 14 17:29:06 2017	(r449842)
@@ -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

Modified: head/games/0ad/files/patch-source_lobby_XmppClient.cpp
==============================================================================
--- head/games/0ad/files/patch-source_lobby_XmppClient.cpp	Thu Sep 14 17:17:53 2017	(r449841)
+++ head/games/0ad/files/patch-source_lobby_XmppClient.cpp	Thu Sep 14 17:29:06 2017	(r449842)
@@ -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", &timestamp))
- 		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", &timestamp))
+-		LOGERROR("Received delayed message with corrupted timestamp %s", timestampStr.to_string());
+-
 -	return std::mktime(&timestamp) - timezone;
-+	return std::mktime(&timestamp);
++	// 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;
  }
  
  /**



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709141729.v8EHT65v019700>