From c9bfccc35345ce58fb5774d4b0b6a9868b262c0a Mon Sep 17 00:00:00 2001 From: giorgio Date: Wed, 5 Sep 2012 08:31:30 +0000 Subject: git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1381061 13f79535-47bb-0310-9956-ffa450edef68 --- .../lightweight-sca/patches/thrift-0.2.0.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sca-cpp/branches/lightweight-sca/patches/thrift-0.2.0.patch (limited to 'sca-cpp/branches/lightweight-sca/patches/thrift-0.2.0.patch') diff --git a/sca-cpp/branches/lightweight-sca/patches/thrift-0.2.0.patch b/sca-cpp/branches/lightweight-sca/patches/thrift-0.2.0.patch new file mode 100644 index 0000000000..a834faca02 --- /dev/null +++ b/sca-cpp/branches/lightweight-sca/patches/thrift-0.2.0.patch @@ -0,0 +1,39 @@ +--- lib/cpp/src/server/TNonblockingServer.cpp ++++ lib/cpp/src/server/TNonblockingServer.cpp +@@ -622,8 +622,8 @@ + hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; + sprintf(port, "%d", port_); + +- // Wildcard address +- error = getaddrinfo(NULL, port, &hints, &res0); ++ // Wildcard or specified address ++ error = getaddrinfo(host_ == "" || host_ =="*"? NULL : host_.c_str(), port, &hints, &res0); + if (error) { + string errStr = "TNonblockingServer::serve() getaddrinfo " + string(gai_strerror(error)); + GlobalOutput(errStr.c_str()); + +--- lib/cpp/src/server/TNonblockingServer.h ++++ lib/cpp/src/server/TNonblockingServer.h +@@ -65,6 +65,9 @@ + // Server socket file descriptor + int serverSocket_; + ++ // Host server runs on ++ std::string host_; ++ + // Port server runs on + int port_; + +@@ -117,10 +120,12 @@ + + TNonblockingServer(boost::shared_ptr processor, + boost::shared_ptr protocolFactory, ++ std::string host, + int port, + boost::shared_ptr threadManager = boost::shared_ptr()) : + TServer(processor), + serverSocket_(-1), ++ host_(host), + port_(port), + threadManager_(threadManager), + eventBase_(NULL), -- cgit v1.2.3