pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add pokerth patches missed in earlier commit.



Module Name:	pkgsrc-wip
Committed By:	Gary Duzan <gary%duzan.org@localhost>
Pushed By:	gary
Date:		Mon Aug 8 07:28:52 2016 -0400
Changeset:	468048927cc1e35a0eed874daf1ecc3603f53183

Added Files:
	pokerth/patches/patch-src_core_common_avatarmanager.cpp
	pokerth/patches/patch-src_core_common_loghelper__server.cpp
	pokerth/patches/patch-src_net_common_clientstate.cpp
	pokerth/patches/patch-src_net_common_clientthread.cpp
	pokerth/patches/patch-src_net_common_downloaderthread.cpp
	pokerth/patches/patch-src_pokerth__server.cpp

Log Message:
Add pokerth patches missed in earlier commit.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=468048927cc1e35a0eed874daf1ecc3603f53183

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 .../patch-src_core_common_avatarmanager.cpp        | 22 +++++++++++++++
 .../patch-src_core_common_loghelper__server.cpp    | 31 ++++++++++++++++++++++
 .../patches/patch-src_net_common_clientstate.cpp   | 15 +++++++++++
 .../patches/patch-src_net_common_clientthread.cpp  | 22 +++++++++++++++
 .../patch-src_net_common_downloaderthread.cpp      | 13 +++++++++
 pokerth/patches/patch-src_pokerth__server.cpp      | 13 +++++++++
 6 files changed, 116 insertions(+)

diffs:
diff --git a/pokerth/patches/patch-src_core_common_avatarmanager.cpp b/pokerth/patches/patch-src_core_common_avatarmanager.cpp
new file mode 100644
index 0000000..d09e3e7
--- /dev/null
+++ b/pokerth/patches/patch-src_core_common_avatarmanager.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/core/common/avatarmanager.cpp.orig	2016-08-06 11:04:30.000000000 +0000
++++ src/core/common/avatarmanager.cpp
+@@ -61,7 +61,7 @@ using namespace std;
+ using namespace boost::filesystem;
+ 
+ struct AvatarFileState {
+-	ifstream		inputStream;
++	boost::filesystem::ifstream		inputStream;
+ };
+ 
+ AvatarManager::AvatarManager(bool useExternalServer, const std::string &externalServerAddress,
+@@ -363,7 +363,7 @@ AvatarManager::StoreAvatarInCache(const 
+ 				path tmpPath(cacheDir);
+ 				tmpPath /= (md5buf.ToString() + ext);
+ 				string fileName(tmpPath.file_string());
+-				ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
++				boost::filesystem::ofstream o(fileName.c_str(), ios_base::out | ios_base::binary | ios_base::trunc);
+ 				if (!o.fail()) {
+ 					o.write((const char *)data, size);
+ 					o.close();
diff --git a/pokerth/patches/patch-src_core_common_loghelper__server.cpp b/pokerth/patches/patch-src_core_common_loghelper__server.cpp
new file mode 100644
index 0000000..2a7adbf
--- /dev/null
+++ b/pokerth/patches/patch-src_core_common_loghelper__server.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- src/core/common/loghelper_server.cpp.orig	2016-08-07 01:11:48.000000000 +0000
++++ src/core/common/loghelper_server.cpp
+@@ -67,7 +67,7 @@ void
+ internal_log_err(const string &msg)
+ {
+ 	if (!g_logFile.empty()) {
+-		ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++		boost::filesystem::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 		if (!o.fail()) {
+ 			o << second_clock::local_time() << " ERR: " << msg;
+ 			o.flush();
+@@ -80,7 +80,7 @@ internal_log_msg(const std::string &msg)
+ {
+ 	if (g_logLevel) {
+ 		if (!g_logFile.empty()) {
+-			ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++			boost::filesystem::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 			if (!o.fail())
+ 				o << second_clock::local_time() << " MSG: " << msg;
+ 		}
+@@ -92,7 +92,7 @@ internal_log_level(const std::string &ms
+ {
+ 	if (g_logLevel >= logLevel) {
+ 		if (!g_logFile.empty()) {
+-			ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
++			boost::filesystem::ofstream o(g_logFile.c_str(), ios_base::out | ios_base::app);
+ 			if (!o.fail())
+ 				o << second_clock::local_time() << " OUT: " << msg;
+ 		}
diff --git a/pokerth/patches/patch-src_net_common_clientstate.cpp b/pokerth/patches/patch-src_net_common_clientstate.cpp
new file mode 100644
index 0000000..972a263
--- /dev/null
+++ b/pokerth/patches/patch-src_net_common_clientstate.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- src/net/common/clientstate.cpp.orig	2016-08-07 01:05:43.000000000 +0000
++++ src/net/common/clientstate.cpp
+@@ -302,8 +302,8 @@ ClientStateReadingServerList::Enter(boos
+ 
+ 		// Unzip the file using zlib.
+ 		try {
+-			ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
+-			ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
++			boost::filesystem::ifstream inFile(zippedServerListPath.directory_string().c_str(), ios_base::in | ios_base::binary);
++			boost::filesystem::ofstream outFile(xmlServerListPath.directory_string().c_str(), ios_base::out | ios_base::trunc);
+ 			boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
+ 			in.push(boost::iostreams::zlib_decompressor());
+ 			in.push(inFile);
diff --git a/pokerth/patches/patch-src_net_common_clientthread.cpp b/pokerth/patches/patch-src_net_common_clientthread.cpp
new file mode 100644
index 0000000..7f079cb
--- /dev/null
+++ b/pokerth/patches/patch-src_net_common_clientthread.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/net/common/clientthread.cpp.orig	2016-08-06 11:06:56.000000000 +0000
++++ src/net/common/clientthread.cpp
+@@ -1604,7 +1604,7 @@ void
+ ClientThread::ReadSessionGuidFromFile()
+ {
+ 	string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
+-	ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
++	boost::filesystem::ifstream guidStream(guidFileName.c_str(), ios::in | ios::binary);
+ 	if (guidStream.good()) {
+ 		std::vector<char> tmpGuid(CLIENT_GUID_SIZE);
+ 		guidStream.read(&tmpGuid[0], CLIENT_GUID_SIZE);
+@@ -1616,7 +1616,7 @@ void
+ ClientThread::WriteSessionGuidToFile() const
+ {
+ 	string guidFileName(GetContext().GetCacheDir() + TEMP_GUID_FILENAME);
+-	ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
++	boost::filesystem::ofstream guidStream(guidFileName.c_str(), ios::out | ios::trunc | ios::binary);
+ 	if (guidStream.good()) {
+ 		guidStream.write(GetContext().GetSessionGuid().c_str(), GetContext().GetSessionGuid().size());
+ 	}
diff --git a/pokerth/patches/patch-src_net_common_downloaderthread.cpp b/pokerth/patches/patch-src_net_common_downloaderthread.cpp
new file mode 100644
index 0000000..17ee657
--- /dev/null
+++ b/pokerth/patches/patch-src_net_common_downloaderthread.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/net/common/downloaderthread.cpp.orig	2016-08-06 11:09:13.000000000 +0000
++++ src/net/common/downloaderthread.cpp
+@@ -96,7 +96,7 @@ DownloaderThread::Main()
+ 				// Previous download was finished.
+ 				if (m_curDownloadData) {
+ 					path filepath(m_curDownloadData->filename);
+-					ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
++					boost::filesystem::ifstream instream(filepath.file_string().c_str(), ios_base::in | ios_base::binary);
+ 					// Find out file size.
+ 					// Not fully portable, but works on win/linux/mac.
+ 					instream.seekg(0, ios_base::beg);
diff --git a/pokerth/patches/patch-src_pokerth__server.cpp b/pokerth/patches/patch-src_pokerth__server.cpp
new file mode 100644
index 0000000..a9c1e99
--- /dev/null
+++ b/pokerth/patches/patch-src_pokerth__server.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/pokerth_server.cpp.orig	2016-08-07 01:13:51.000000000 +0000
++++ src/pokerth_server.cpp
+@@ -161,7 +161,7 @@ main(int argc, char *argv[])
+ 		pidFile = tmpPidPath.directory_string();
+ 	}
+ 	{
+-		ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
++		boost::filesystem::ofstream pidStream(pidFile.c_str(), ios_base::out | ios_base::trunc);
+ 		if (!pidStream.fail())
+ 			pidStream << getpid();
+ 		else


Home | Main Index | Thread Index | Old Index