summaryrefslogtreecommitdiff
path: root/net-p2p/verlihub/files
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/verlihub/files')
-rw-r--r--net-p2p/verlihub/files/db_charset.patch83
-rw-r--r--net-p2p/verlihub/files/db_charset_gcc43.patch112
-rw-r--r--net-p2p/verlihub/files/verlihub-gcc43.patch50
3 files changed, 112 insertions, 133 deletions
diff --git a/net-p2p/verlihub/files/db_charset.patch b/net-p2p/verlihub/files/db_charset.patch
deleted file mode 100644
index eb54aec..0000000
--- a/net-p2p/verlihub/files/db_charset.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-diff -Naur verlihub-orig/src/cdbconf.cpp verlihub/src/cdbconf.cpp
---- verlihub-orig/src/cdbconf.cpp 2008-10-18 18:43:43.000000000 +0400
-+++ verlihub/src/cdbconf.cpp 2008-10-18 18:43:09.000000000 +0400
-@@ -22,6 +22,7 @@
- Add("lang_name",lang_name,string("lang_en"));
- Add("allow_exec",allow_exec, false);
- Add("allow_exec_mod",allow_exec_mod, true);
-+ Add("db_charset",db_charset,string("utf8"));
- Load();
- }
-
-diff -Naur verlihub-orig/src/cdbconf.h verlihub/src/cdbconf.h
---- verlihub-orig/src/cdbconf.h 2008-10-18 18:43:43.000000000 +0400
-+++ verlihub/src/cdbconf.h 2008-10-18 18:43:09.000000000 +0400
-@@ -31,6 +31,7 @@
- string db_user;
- string db_pass;
- string db_data;
-+ string db_charset;
- string config_name;
- string lang_name;
- bool allow_exec;
-diff -Naur verlihub-orig/src/cmysql.cpp verlihub/src/cmysql.cpp
---- verlihub-orig/src/cmysql.cpp 2008-10-18 18:43:43.000000000 +0400
-+++ verlihub/src/cmysql.cpp 2008-10-18 18:43:09.000000000 +0400
-@@ -19,10 +19,10 @@
- /*!
- \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data)
- */
--cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL")
-+cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL")
- {
- Init();
-- if(!Connect(host,user,pass,data))
-+ if(!Connect(host,user,pass,data,charset))
- {
- throw "Mysql connection error.";
- }
-@@ -40,12 +40,13 @@
- if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: "));
- }
-
--bool cMySQL::Connect(string &host, string &user, string &pass, string &data)
-+bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset)
- {
- if(Log(1)) LogStream() << "Connecting to mysql server: "
-- << user << "@" << host << "/" << data << endl;
-+ << user << "@" << host << "/" << data << "with charset " << charset << endl;
-
- mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0);
-+ mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str());
-
- if(!mysql_real_connect(
- mDBHandle,
-diff -Naur verlihub-orig/src/cmysql.h verlihub/src/cmysql.h
---- verlihub-orig/src/cmysql.h 2008-10-18 18:43:43.000000000 +0400
-+++ verlihub/src/cmysql.h 2008-10-18 18:43:09.000000000 +0400
-@@ -34,10 +34,10 @@
- friend class cQuery;
- public:
- cMySQL();
-- cMySQL(string&host,string&user,string&pass,string&data);
-+ cMySQL(string&host,string&user,string&pass,string&data,string&charset);
- ~cMySQL();
- void Init();
-- bool Connect(string &host, string &user, string &passwd, string &db);
-+ bool Connect(string &host, string &user, string &passwd, string &db, string &charset);
- public: void Error(int level, string text);
-
- private:
-diff -Naur verlihub-orig/src/cserverdc.cpp verlihub/src/cserverdc.cpp
---- verlihub-orig/src/cserverdc.cpp 2008-10-18 18:43:43.000000000 +0400
-+++ verlihub/src/cserverdc.cpp 2008-10-18 18:43:09.000000000 +0400
-@@ -72,7 +72,8 @@
- mDBConf.db_host,
- mDBConf.db_user,
- mDBConf.db_pass,
-- mDBConf.db_data), // connect to mysql
-+ mDBConf.db_data,
-+ mDBConf.db_charset), // connect to mysql
- mC(*this), // create the config object
- mL(*this),
- mSetupList(mMySQL),
diff --git a/net-p2p/verlihub/files/db_charset_gcc43.patch b/net-p2p/verlihub/files/db_charset_gcc43.patch
new file mode 100644
index 0000000..0b51040
--- /dev/null
+++ b/net-p2p/verlihub/files/db_charset_gcc43.patch
@@ -0,0 +1,112 @@
+diff -Naur verlihub-0.9.8e-r2/src/cconfmysql.h verlihub-0.9.8e-r2-patched/src/cconfmysql.h
+--- verlihub-0.9.8e-r2/src/cconfmysql.h 2009-03-14 18:24:56.000000000 +0200
++++ verlihub-0.9.8e-r2-patched/src/cconfmysql.h 2010-03-11 10:29:42.849254472 +0200
+@@ -20,6 +20,7 @@
+
+ #include "cconfigbase.h"
+ #include <iostream>
++#include <string.h>
+ #include <iomanip>
+ #include "cmysql.h"
+ #include "cquery.h"
+diff -Naur verlihub-0.9.8e-r2/src/cdbconf.cpp verlihub-0.9.8e-r2-patched/src/cdbconf.cpp
+--- verlihub-0.9.8e-r2/src/cdbconf.cpp 2009-03-23 17:18:58.000000000 +0200
++++ verlihub-0.9.8e-r2-patched/src/cdbconf.cpp 2010-03-11 10:23:41.705015757 +0200
+@@ -22,6 +22,7 @@
+ Add("lang_name",lang_name,string("lang_en"));
+ Add("allow_exec",allow_exec, false);
+ Add("allow_exec_mod",allow_exec_mod, true);
++ Add("db_charset",db_charset,string("utf8"));
+ Load();
+ }
+
+diff -Naur verlihub-0.9.8e-r2/src/cdbconf.h verlihub-0.9.8e-r2-patched/src/cdbconf.h
+--- verlihub-0.9.8e-r2/src/cdbconf.h 2009-03-23 17:19:47.000000000 +0200
++++ verlihub-0.9.8e-r2-patched/src/cdbconf.h 2010-03-11 10:24:22.047010055 +0200
+@@ -31,6 +31,7 @@
+ string db_user;
+ string db_pass;
+ string db_data;
++ string db_charset;
+ string config_name;
+ string lang_name;
+ bool allow_exec;
+diff -Naur verlihub-0.9.8e-r2/src/cmysql.cpp verlihub-0.9.8e-r2-patched/src/cmysql.cpp
+--- verlihub-0.9.8e-r2/src/cmysql.cpp 2009-04-06 16:26:49.000000000 +0300
++++ verlihub-0.9.8e-r2-patched/src/cmysql.cpp 2010-03-11 10:26:58.097009739 +0200
+@@ -33,11 +33,11 @@
+ /*!
+ \fn nMySQL::cMySQL::cMySQL(string&host,string&user,string&pass,string&data)
+ */
+-cMySQL::cMySQL(string&host,string&user,string&pass,string&data) : cObj("cMySQL")
++cMySQL::cMySQL(string&host,string&user,string&pass,string&data,string&charset) : cObj("cMySQL")
+ {
+ mDBName = data;
+ Init();
+- if(!Connect(host,user,pass,data))
++ if(!Connect(host,user,pass,data,charset))
+ {
+ throw "Mysql connection error.";
+ }
+@@ -55,10 +55,10 @@
+ if(!mDBHandle) Error(0, string("Can't init mysql structure :(.: "));
+ }
+
+-bool cMySQL::Connect(string &host, string &user, string &pass, string &data)
++bool cMySQL::Connect(string &host, string &user, string &pass, string &data, string &charset)
+ {
+ if(Log(1)) LogStream() << "Connecting to mysql server: "
+- << user << "@" << host << "/" << data << " using UTF8 encoding" << endl;
++ << user << "@" << host << "/" << data << "with charset " << charset << endl;
+
+ mysql_options(mDBHandle,MYSQL_OPT_COMPRESS,0);
+ //mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,"utf8");
+@@ -66,7 +66,7 @@
+ mysql_options(mDBHandle, MYSQL_OPT_RECONNECT, "true");
+ #endif
+
+- //mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str());
++ mysql_options(mDBHandle,MYSQL_SET_CHARSET_NAME,charset.c_str());
+
+ if(!mysql_real_connect(
+ mDBHandle,
+diff -Naur verlihub-0.9.8e-r2/src/cmysql.h verlihub-0.9.8e-r2-patched/src/cmysql.h
+--- verlihub-0.9.8e-r2/src/cmysql.h 2009-05-16 17:46:26.000000000 +0300
++++ verlihub-0.9.8e-r2-patched/src/cmysql.h 2010-03-11 10:27:40.220256720 +0200
+@@ -47,10 +47,10 @@
+ friend class cQuery;
+ public:
+ cMySQL();
+- cMySQL(string&host,string&user,string&pass,string&data);
++ cMySQL(string&host,string&user,string&pass,string&data,string&charset);
+ ~cMySQL();
+ void Init();
+- bool Connect(string &host, string &user, string &passwd, string &db);
++ bool Connect(string &host, string &user, string &passwd, string &db, string &charset);
+ string GetDBName()
+ {
+ return mDBName;
+diff -Naur verlihub-0.9.8e-r2/src/cpenaltylist.cpp verlihub-0.9.8e-r2-patched/src/cpenaltylist.cpp
+--- verlihub-0.9.8e-r2/src/cpenaltylist.cpp 2009-05-16 17:48:00.000000000 +0300
++++ verlihub-0.9.8e-r2-patched/src/cpenaltylist.cpp 2010-03-11 10:30:28.559004554 +0200
+@@ -21,6 +21,7 @@
+ ***************************************************************************/
+
+ #include "cpenaltylist.h"
++#include <string.h>
+
+ namespace nDirectConnect {
+
+diff -Naur verlihub-0.9.8e-r2/src/cserverdc.cpp verlihub-0.9.8e-r2-patched/src/cserverdc.cpp
+--- verlihub-0.9.8e-r2/src/cserverdc.cpp 2009-07-10 21:45:07.000000000 +0300
++++ verlihub-0.9.8e-r2-patched/src/cserverdc.cpp 2010-03-11 10:28:57.267254788 +0200
+@@ -87,7 +87,8 @@
+ mDBConf.db_host,
+ mDBConf.db_user,
+ mDBConf.db_pass,
+- mDBConf.db_data), // connect to mysql
++ mDBConf.db_data,
++ mDBConf.db_charset), // connect to mysql
+ mC(*this), // create the config object
+ mL(*this),
+ mSetupList(mMySQL),
diff --git a/net-p2p/verlihub/files/verlihub-gcc43.patch b/net-p2p/verlihub/files/verlihub-gcc43.patch
deleted file mode 100644
index ebdc6d3..0000000
--- a/net-p2p/verlihub/files/verlihub-gcc43.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- verlihub/src/cconfigitembase.cpp.orig 2009-02-12 13:41:32.000000000 +0300
-+++ verlihub/src/cconfigitembase.cpp 2009-02-12 13:41:53.000000000 +0300
-@@ -12,6 +12,7 @@
- #include <iostream>
- #include <stdio.h>
- #include "stringutils.h"
-+#include <string.h>
-
- using namespace nStringUtils;
- using namespace std;
---- verlihub/src/cconfmysql.cpp.orig 2009-02-12 13:42:18.000000000 +0300
-+++ verlihub/src/cconfmysql.cpp 2009-02-12 13:42:33.000000000 +0300
-@@ -17,6 +17,7 @@
-
- #include "cconfmysql.h"
- #include <algorithm>
-+#include <string.h>
- using namespace std;
-
- namespace nConfig
---- verlihub/src/cpenaltylist.cpp.orig 2009-02-12 13:48:36.000000000 +0300
-+++ verlihub/src/cpenaltylist.cpp 2009-02-12 13:48:21.000000000 +0300
-@@ -8,6 +8,7 @@
- * (at your option) any later version. *
- ***************************************************************************/
- #include "cpenaltylist.h"
-+#include <string.h>
-
- namespace nDirectConnect {
-
---- verlihub/src/creguserinfo.cpp.orig 2009-02-12 13:49:44.000000000 +0300
-+++ verlihub/src/creguserinfo.cpp 2009-02-12 13:50:06.000000000 +0300
-@@ -27,6 +27,7 @@
- #endif
- #include "creguserinfo.h"
- #include "ctime.h"
-+#include <string.h>
-
- using namespace ::nUtils;
-
---- verlihub/src/stringutils.cpp.orig 2009-02-12 13:52:50.000000000 +0300
-+++ verlihub/src/stringutils.cpp 2009-02-12 13:53:05.000000000 +0300
-@@ -7,6 +7,7 @@
- #include <fstream>
- #include <sstream>
- #include <stdio.h>
-+#include <stdlib.h>
-
- namespace nStringUtils
- {