summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/patches
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/patches')
-rw-r--r--sca-cpp/trunk/patches/scribe-2.2.patch53
-rw-r--r--sca-cpp/trunk/patches/thrift-0.8.0.patch (renamed from sca-cpp/trunk/patches/thrift-0.2.0.patch)36
2 files changed, 72 insertions, 17 deletions
diff --git a/sca-cpp/trunk/patches/scribe-2.2.patch b/sca-cpp/trunk/patches/scribe-2.2.patch
index 16c2e3871e..2f6b096719 100644
--- a/sca-cpp/trunk/patches/scribe-2.2.patch
+++ b/sca-cpp/trunk/patches/scribe-2.2.patch
@@ -10,6 +10,23 @@
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/convenience.hpp>
+--- src/conn_pool.cpp
++++ src/conn_pool.cpp
+@@ -271,11 +271,11 @@
+ ++iter) {
+ msgs.push_back(**iter);
+ }
+- ResultCode result = TRY_LATER;
++ ResultCode::type result = ResultCode::TRY_LATER;
+ try {
+ result = resendClient->Log(msgs);
+
+- if (result == OK) {
++ if (result == ResultCode::OK) {
+ if (g_Handler) {
+ g_Handler->incrementCounter("sent", size);
+ }
+
--- src/file.cpp
+++ src/file.cpp
@@ -74,9 +74,21 @@
@@ -56,6 +73,32 @@
LOG_OPER("Starting scribe server on port %lu", g_Handler->port);
fflush(stderr);
+@@ -409,13 +411,13 @@
+ }
+
+
+-ResultCode scribeHandler::Log(const vector<LogEntry>& messages) {
+- ResultCode result;
++ResultCode::type scribeHandler::Log(const vector<LogEntry>& messages) {
++ ResultCode::type result;
+
+ scribeHandlerLock.acquireRead();
+
+ if (throttleRequest(messages)) {
+- result = TRY_LATER;
++ result = ResultCode::TRY_LATER;
+ goto end;
+ }
+
+@@ -463,7 +465,7 @@
+ addMessage(*msg_iter, store_list);
+ }
+
+- result = OK;
++ result = ResultCode::OK;
+
+ end:
+ scribeHandlerLock.release();
@@ -583,6 +585,8 @@
throw runtime_error("No port number configured");
}
@@ -68,6 +111,15 @@
--- src/scribe_server.h
+++ src/scribe_server.h
+@@ -42,7 +42,7 @@
+ void initialize();
+ void reinitialize();
+
+- scribe::thrift::ResultCode Log(const std::vector<scribe::thrift::LogEntry>& messages);
++ scribe::thrift::ResultCode::type Log(const std::vector<scribe::thrift::LogEntry>& messages);
+
+ void getVersion(std::string& _return) {_return = "2.2";}
+ facebook::fb303::fb_status getStatus();
@@ -51,6 +51,7 @@
void setStatusDetails(const std::string& new_status_details);
@@ -76,3 +128,4 @@
// number of threads processing new Thrift connections
size_t numThriftServerThreads;
+
diff --git a/sca-cpp/trunk/patches/thrift-0.2.0.patch b/sca-cpp/trunk/patches/thrift-0.8.0.patch
index a834faca02..09b4412c3a 100644
--- a/sca-cpp/trunk/patches/thrift-0.2.0.patch
+++ b/sca-cpp/trunk/patches/thrift-0.8.0.patch
@@ -1,6 +1,6 @@
--- lib/cpp/src/server/TNonblockingServer.cpp
+++ lib/cpp/src/server/TNonblockingServer.cpp
-@@ -622,8 +622,8 @@
+@@ -989,8 +989,8 @@
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
sprintf(port, "%d", port_);
@@ -14,26 +14,28 @@
--- lib/cpp/src/server/TNonblockingServer.h
+++ lib/cpp/src/server/TNonblockingServer.h
-@@ -65,6 +65,9 @@
- // Server socket file descriptor
+@@ -126,6 +126,9 @@
+ /// Server socket file descriptor
int serverSocket_;
-+ // Host server runs on
++ /// Host server runs on
+ std::string host_;
+
- // Port server runs on
+ /// Port server runs on
int port_;
-@@ -117,10 +120,12 @@
+@@ -294,11 +297,13 @@
+ TNonblockingServer(
+ const boost::shared_ptr<Processor>& processor,
+ const boost::shared_ptr<TProtocolFactory>& protocolFactory,
++ const std::string host,
+ int port,
+ const boost::shared_ptr<ThreadManager>& threadManager =
+ boost::shared_ptr<ThreadManager>(),
+ THRIFT_OVERLOAD_IF(Processor, TProcessor)) :
+- TServer(processor) {
++ TServer(processor),
++ host_(host) {
+
+ init(port);
- TNonblockingServer(boost::shared_ptr<TProcessor> processor,
- boost::shared_ptr<TProtocolFactory> protocolFactory,
-+ std::string host,
- int port,
- boost::shared_ptr<ThreadManager> threadManager = boost::shared_ptr<ThreadManager>()) :
- TServer(processor),
- serverSocket_(-1),
-+ host_(host),
- port_(port),
- threadManager_(threadManager),
- eventBase_(NULL),