diff options
author | collin <collin+i@collinmcqueen.com> | 2022-01-14 12:55:20 -0500 |
---|---|---|
committer | collin <collin+i@collinmcqueen.com> | 2022-01-14 12:55:20 -0500 |
commit | f9618b7c0d25e378124cb96a5dfb615fb8120699 (patch) | |
tree | 5330cbf766aa559e0c1c1e7f88eabe2b06de0323 | |
parent | 29f009648977bf73cce52148ff63c761c028eac9 (diff) | |
download | sdl_core-f9618b7c0d25e378124cb96a5dfb615fb8120699.tar.gz |
build on ubuntu 18
8 files changed, 82 insertions, 90 deletions
diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp index db058d27bd..d997577312 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp @@ -150,7 +150,7 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { if (lineNumber == -1 && fileName == NA && methodName == NA_METHOD) { os.writeNull(p); } else { - char prolog[] = { + unsigned char prolog[] = { 0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, @@ -163,7 +163,7 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 0x78, 0x70 }; - os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p); + os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, (char*)prolog, sizeof(prolog), p); char* line = p.itoa(lineNumber); // // construct Java-like fullInfo (replace "::" with ".") diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp index 58b2004216..c0acf3c5a6 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp @@ -256,63 +256,63 @@ void LoggingEvent::setProperty(const LogString& key, const LogString& value) void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) { - char classDesc[] = { - 0x72, 0x00, 0x21, - 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, - 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, - 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67, - 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E, - 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5, - 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D, - 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F, - 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x5A, 0x00, 0x11, 0x6E, - 0x64, 0x63, 0x4C, 0x6F, 0x6F, 0x6B, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, - 0x4A, 0x00, 0x09, 0x74, 0x69, 0x6D, 0x65, 0x53, - 0x74, 0x61, 0x6D, 0x70, 0x4C, 0x00, 0x0C, 0x63, - 0x61, 0x74, 0x65, 0x67, 0x6F, 0x72, 0x79, 0x4E, - 0x61, 0x6D, 0x65, 0x74, 0x00, 0x12, 0x4C, 0x6A, - 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, - 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, - 0x4C, 0x00, 0x0C, 0x6C, 0x6F, 0x63, 0x61, 0x74, - 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0x74, - 0x00, 0x23, 0x4C, 0x6F, 0x72, 0x67, 0x2F, 0x61, - 0x70, 0x61, 0x63, 0x68, 0x65, 0x2F, 0x6C, 0x6F, - 0x67, 0x34, 0x6A, 0x2F, 0x73, 0x70, 0x69, 0x2F, - 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, - 0x49, 0x6E, 0x66, 0x6F, 0x3B, 0x4C, 0x00, 0x07, - 0x6D, 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x74, - 0x00, 0x15, 0x4C, 0x6A, 0x61, 0x76, 0x61, 0x2F, - 0x75, 0x74, 0x69, 0x6C, 0x2F, 0x48, 0x61, 0x73, - 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x3B, 0x4C, - 0x00, 0x03, 0x6E, 0x64, 0x63, - 0x74, 0x00, 0x12, 0x4C, 0x6A, - 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, + unsigned char classDesc[] = { + 0x72, 0x00, 0x21, + 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, + 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67, + 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E, + 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5, + 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D, + 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F, + 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x69, 0x72, 0x65, 0x64, 0x5A, 0x00, 0x11, 0x6E, + 0x64, 0x63, 0x4C, 0x6F, 0x6F, 0x6B, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x4A, 0x00, 0x09, 0x74, 0x69, 0x6D, 0x65, 0x53, + 0x74, 0x61, 0x6D, 0x70, 0x4C, 0x00, 0x0C, 0x63, + 0x61, 0x74, 0x65, 0x67, 0x6F, 0x72, 0x79, 0x4E, + 0x61, 0x6D, 0x65, 0x74, 0x00, 0x12, 0x4C, 0x6A, + 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, - 0x4C, 0x00, 0x0F, 0x72, 0x65, 0x6E, - 0x64, 0x65, 0x72, 0x65, 0x64, 0x4D, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, - 0x74, 0x00, 0x12, 0x4C, 0x6A, - 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, + 0x4C, 0x00, 0x0C, 0x6C, 0x6F, 0x63, 0x61, 0x74, + 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0x74, + 0x00, 0x23, 0x4C, 0x6F, 0x72, 0x67, 0x2F, 0x61, + 0x70, 0x61, 0x63, 0x68, 0x65, 0x2F, 0x6C, 0x6F, + 0x67, 0x34, 0x6A, 0x2F, 0x73, 0x70, 0x69, 0x2F, + 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, + 0x49, 0x6E, 0x66, 0x6F, 0x3B, 0x4C, 0x00, 0x07, + 0x6D, 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x74, + 0x00, 0x15, 0x4C, 0x6A, 0x61, 0x76, 0x61, 0x2F, + 0x75, 0x74, 0x69, 0x6C, 0x2F, 0x48, 0x61, 0x73, + 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x3B, 0x4C, + 0x00, 0x03, 0x6E, 0x64, 0x63, + 0x74, 0x00, 0x12, 0x4C, 0x6A, + 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, - 0x4C, 0x00, 0x0A, 0x74, 0x68, 0x72, 0x65, - 0x61, 0x64, 0x4E, 0x61, 0x6D, 0x65, - 0x74, 0x00, 0x12, 0x4C, 0x6A, - 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, + 0x4C, 0x00, 0x0F, 0x72, 0x65, 0x6E, + 0x64, 0x65, 0x72, 0x65, 0x64, 0x4D, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, + 0x74, 0x00, 0x12, 0x4C, 0x6A, + 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, - 0x4C, 0x00, 0x0D, 0x74, 0x68, - 0x72, 0x6F, 0x77, 0x61, 0x62, 0x6C, 0x65, 0x49, - 0x6E, 0x66, 0x6F, 0x74, 0x00, 0x2B, 0x4C, 0x6F, - 0x72, 0x67, 0x2F, 0x61, 0x70, 0x61, 0x63, 0x68, - 0x65, 0x2F, 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2F, - 0x73, 0x70, 0x69, 0x2F, 0x54, 0x68, 0x72, 0x6F, - 0x77, 0x61, 0x62, 0x6C, 0x65, 0x49, 0x6E, 0x66, - 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E, - 0x3B, 0x78, 0x70 }; - - os.writeProlog("org.apache.log4j.spi.LoggingEvent", - 8, classDesc, sizeof(classDesc), p); + 0x4C, 0x00, 0x0A, 0x74, 0x68, 0x72, 0x65, + 0x61, 0x64, 0x4E, 0x61, 0x6D, 0x65, + 0x74, 0x00, 0x12, 0x4C, 0x6A, + 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, + 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, + 0x4C, 0x00, 0x0D, 0x74, 0x68, + 0x72, 0x6F, 0x77, 0x61, 0x62, 0x6C, 0x65, 0x49, + 0x6E, 0x66, 0x6F, 0x74, 0x00, 0x2B, 0x4C, 0x6F, + 0x72, 0x67, 0x2F, 0x61, 0x70, 0x61, 0x63, 0x68, + 0x65, 0x2F, 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2F, + 0x73, 0x70, 0x69, 0x2F, 0x54, 0x68, 0x72, 0x6F, + 0x77, 0x61, 0x62, 0x6C, 0x65, 0x49, 0x6E, 0x66, + 0x6F, 0x72, 0x6D, 0x61, 0x74, 0x69, 0x6F, 0x6E, + 0x3B, 0x78, 0x70 }; + + os.writeProlog("org.apache.log4j.spi.LoggingEvent", + 8, (char*)classDesc, sizeof(classDesc), p); } void LoggingEvent::write(helpers::ObjectOutputStream& os, Pool& p) const { diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp index 7cd696b842..69a8f52c8a 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp @@ -36,8 +36,8 @@ ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p) objectHandle(0x7E0000), classDescriptions(new ClassDescriptionMap()) { - char start[] = { 0xAC, 0xED, 0x00, 0x05 }; - ByteBuffer buf(start, sizeof(start)); + unsigned char start[] = { 0xAC, 0xED, 0x00, 0x05 }; + ByteBuffer buf((char*)start, sizeof(start)); os->write(buf, p); } @@ -81,7 +81,7 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { // // TC_OBJECT and the classDesc for java.util.Hashtable // - char prolog[] = { + unsigned char prolog[] = { 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, @@ -90,12 +90,12 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6F, 0x6C, 0x64, 0x78, 0x70 }; - writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p); + writeProlog("java.util.Hashtable", 1, (char*)prolog, sizeof(prolog), p); // // loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7 - char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, + unsigned char data[] = { 0x3F, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, TC_BLOCKDATA, 0x08, 0x00, 0x00, 0x00, 0x07 }; - ByteBuffer dataBuf(data, sizeof(data)); + ByteBuffer dataBuf((char*)data, sizeof(data)); os->write(dataBuf, p); char size[4]; size_t sz = val.size(); @@ -103,7 +103,7 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { size[2] = (char) ((sz >> 8) & 0xFF); size[1] = (char) ((sz >> 16) & 0xFF); size[0] = (char) ((sz >> 24) & 0xFF); - ByteBuffer sizeBuf(size, sizeof(size)); + ByteBuffer sizeBuf((char*)size, sizeof(size)); os->write(sizeBuf, p); for(MDC::Map::const_iterator iter = val.begin(); iter != val.end(); diff --git a/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp b/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp index a500628180..b2101e51ff 100644 --- a/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp +++ b/src/3rd_party/apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp @@ -53,7 +53,7 @@ LOGUNIT_CLASS(DOMTestCase) LOGUNIT_TEST(test2); #endif LOGUNIT_TEST(test3); - LOGUNIT_TEST(test4); + LOGUNIT_TEST(test4); LOGUNIT_TEST_SUITE_END(); LoggerPtr root; @@ -181,21 +181,21 @@ public: LOG4CXX_FATAL(root, "Message " << i); } - + /** * Creates a output file that ends with a superscript 3. * Output file is checked by build.xml after completion. - */ + */ void test3() { DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); #if LOG4CXX_LOGCHAR_IS_UTF8 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; + const unsigned char fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; #else const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 }; #endif File file; - file.setPath(fname); + file.setPath((char*)fname); Pool p; bool exists = file.exists(p); LOGUNIT_ASSERT(exists); @@ -204,22 +204,22 @@ public: /** * Creates a output file that ends with a ideographic 4. * Output file is checked by build.xml after completion. - */ + */ void test4() { DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); #if LOG4CXX_LOGCHAR_IS_UTF8 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; + const unsigned char fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; #else const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 }; #endif File file; - file.setPath(fname); + file.setPath((logchar*)fname); Pool p; bool exists = file.exists(p); LOGUNIT_ASSERT(exists); } - + }; LOGUNIT_TEST_SUITE_REGISTRATION(DOMTestCase); diff --git a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h index 9692c4aef4..364cf9a088 100644 --- a/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h +++ b/src/components/hmi_message_handler/include/hmi_message_handler/websocket_session.h @@ -90,7 +90,6 @@ class CMessageBrokerController; class WebsocketSession : public std::enable_shared_from_this<WebsocketSession> { boost::beast::websocket::stream<boost::asio::ip::tcp::socket> ws_; - boost::asio::strand<boost::asio::io_context::executor_type> strand_; boost::beast::multi_buffer buffer_; boost::beast::multi_buffer send_buffer_; CMessageBrokerController* controller_; @@ -205,4 +204,4 @@ class WebsocketSession : public std::enable_shared_from_this<WebsocketSession> { } // hmi_message_handler -#endif /* WEBSOCKET_SESSION_H */
\ No newline at end of file +#endif /* WEBSOCKET_SESSION_H */ diff --git a/src/components/hmi_message_handler/src/websocket_session.cc b/src/components/hmi_message_handler/src/websocket_session.cc index 26f15695c9..c594598eb2 100644 --- a/src/components/hmi_message_handler/src/websocket_session.cc +++ b/src/components/hmi_message_handler/src/websocket_session.cc @@ -37,7 +37,6 @@ namespace hmi_message_handler { WebsocketSession::WebsocketSession(boost::asio::ip::tcp::socket socket, CMessageBrokerController* controller) : ws_(std::move(socket)) - , strand_(ws_.get_executor()) , controller_(controller) , stop(false) , m_receivingBuffer("") @@ -52,10 +51,8 @@ WebsocketSession::WebsocketSession(boost::asio::ip::tcp::socket socket, WebsocketSession::~WebsocketSession() {} void WebsocketSession::Accept() { - ws_.async_accept(boost::asio::bind_executor( - strand_, - std::bind( - &WebsocketSession::Recv, shared_from_this(), std::placeholders::_1))); + ws_.async_accept(std::bind( + &WebsocketSession::Recv, shared_from_this(), std::placeholders::_1)); } void WebsocketSession::Shutdown() { @@ -85,11 +82,10 @@ void WebsocketSession::Recv(boost::system::error_code ec) { } ws_.async_read(buffer_, - boost::asio::bind_executor(strand_, - std::bind(&WebsocketSession::Read, - shared_from_this(), - std::placeholders::_1, - std::placeholders::_2))); + std::bind(&WebsocketSession::Read, + shared_from_this(), + std::placeholders::_1, + std::placeholders::_2)); } void WebsocketSession::Send(std::string& message, Json::Value& json_message) { @@ -319,4 +315,4 @@ void WebsocketSession::LoopThreadDelegate::SetShutdown() { message_queue_.Shutdown(); } } -}
\ No newline at end of file +} diff --git a/src/components/security_manager/src/crypto_manager_impl.cc b/src/components/security_manager/src/crypto_manager_impl.cc index 6bee28a976..8c245a3b4c 100644 --- a/src/components/security_manager/src/crypto_manager_impl.cc +++ b/src/components/security_manager/src/crypto_manager_impl.cc @@ -136,9 +136,6 @@ bool CryptoManagerImpl::Init() { const SSL_METHOD* method; #endif switch (get_settings().security_manager_protocol_name()) { - case SSLv3: - method = is_server ? SSLv3_server_method() : SSLv3_client_method(); - break; case TLSv1: method = is_server ? TLSv1_server_method() : TLSv1_client_method(); break; diff --git a/src/components/security_manager/src/ssl_context_impl.cc b/src/components/security_manager/src/ssl_context_impl.cc index 5be5ff8363..6f8783e70e 100644 --- a/src/components/security_manager/src/ssl_context_impl.cc +++ b/src/components/security_manager/src/ssl_context_impl.cc @@ -280,7 +280,7 @@ bool CryptoManagerImpl::SSLContextImpl::WriteHandshakeData( if (ret <= 0) { is_handshake_pending_ = false; ResetConnection(); - return Handshake_Result_AbnormalFail; + return false; } } return true; @@ -477,7 +477,7 @@ void CryptoManagerImpl::SSLContextImpl::ResetConnection() { SSL_shutdown(connection_); } LOG4CXX_DEBUG(logger_, "SSL connection recreation"); - SSL_CTX* ssl_context = connection_->ctx; + SSL_CTX* ssl_context = SSL_get_SSL_CTX(connection_); SSL_free(connection_); connection_ = SSL_new(ssl_context); if (mode_ == SERVER) { |