Fixed a few typos - test client and server samples now working with new code generation
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664753 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/Util.h b/lib/cpp/src/concurrency/Util.h
index 3342653..df37471 100644
--- a/lib/cpp/src/concurrency/Util.h
+++ b/lib/cpp/src/concurrency/Util.h
@@ -5,7 +5,11 @@
#include <assert.h>
#include <stddef.h>
+#if defined(HAVE_CLOCK_GETTIME)
+#include <time.h>
+#else // defined(HAVE_CLOCK_GETTIME)
#include <sys/time.h>
+#endif // defined(HAVE_CLOCK_GETTIME)
namespace facebook { namespace thrift { namespace concurrency {
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.cc b/lib/cpp/src/protocol/TBinaryProtocol.cc
index 7ad3b2b..3cd11ba 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.cc
+++ b/lib/cpp/src/protocol/TBinaryProtocol.cc
@@ -110,6 +110,20 @@
return 2;
}
+uint32_t TBinaryProtocol::writeU32(shared_ptr<TTransport> out,
+ const uint32_t u32) const {
+ uint32_t net = (uint32_t)htonl(u32);
+ out->write((uint8_t*)&net, 4);
+ return 4;
+}
+
+uint32_t TBinaryProtocol::writeI32(shared_ptr<TTransport> out,
+ const int32_t i32) const {
+ int32_t net = (int32_t)htonl(i32);
+ out->write((uint8_t*)&net, 4);
+ return 4;
+}
+
uint32_t TBinaryProtocol::writeU64(shared_ptr<TTransport> out,
const uint64_t u64) const {
uint64_t net = (uint64_t)htonll(u64);
@@ -135,10 +149,10 @@
* Reading functions
*/
-uint32_t TBinaryProtocol::readMessasgeBegin(shared_ptr<TTransport> in,
- std::string& name,
- TMessageType& messageType,
- uint32_t& seqid) const {
+uint32_t TBinaryProtocol::readMessageBegin(shared_ptr<TTransport> in,
+ std::string& name,
+ TMessageType& messageType,
+ uint32_t& seqid) const {
uint32_t result = 0;
uint8_t type;
diff --git a/lib/cpp/src/protocol/TBinaryProtocol.h b/lib/cpp/src/protocol/TBinaryProtocol.h
index e70f687..480182d 100644
--- a/lib/cpp/src/protocol/TBinaryProtocol.h
+++ b/lib/cpp/src/protocol/TBinaryProtocol.h
@@ -97,10 +97,10 @@
*/
- uint32_t readMessasgeBegin(shared_ptr<TTransport> in,
- std::string& name,
- TMessageType& messageType,
- uint32_t& seqid) const;
+ uint32_t readMessageBegin(shared_ptr<TTransport> in,
+ std::string& name,
+ TMessageType& messageType,
+ uint32_t& seqid) const;
uint32_t readMessageEnd(shared_ptr<TTransport> in) const;