diff options
author | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 01:01:22 -0800 |
---|---|---|
committer | Juergen Gehring <juergen.gehring@bmw.de> | 2018-01-25 01:01:22 -0800 |
commit | 2fd0625d21f1fa8e6a3adfc89ce9f381a4d33990 (patch) | |
tree | 373a6c991944c700ee3ff1fe872daa3f751281d8 | |
parent | 2c259a9cbfa8fbde71ebc62d45684c375311f4fc (diff) | |
download | genivi-common-api-runtime-2fd0625d21f1fa8e6a3adfc89ce9f381a4d33990.tar.gz |
capicxx-core-runtime 3.1.12.43.1.12.4
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | CMakeLists.txt | 12 | ||||
-rw-r--r-- | include/CommonAPI/Event.hpp | 5 | ||||
-rw-r--r-- | include/CommonAPI/Variant.hpp | 4 | ||||
-rw-r--r-- | src/CommonAPI/Runtime.cpp | 2 |
5 files changed, 21 insertions, 7 deletions
@@ -1,5 +1,10 @@ Changes ======= + +v3.1.12.4 +- Fix calling of registered subscription status handlers for + selective broadcasts + v3.1.12.3 - Added copy constructor for CommonAPI CallInfo diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aeb97a..7897345 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,10 +42,14 @@ SET(RPM_PACKAGE_VERSION "r0" CACHE STRING "rpm packet version") # used in e.g. c SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level") message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}") +# Set a default build type if none was specified +set(default_build_type "RelWithDebInfo") if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING - "Choose the type of build, options are: Debug Release." FORCE) -endif(NOT CMAKE_BUILD_TYPE) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() set(CMAKE_BUILD_TYPE_FOR_SPEC_IN "") string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_FOR_SPEC_IN) @@ -98,7 +102,7 @@ IF(MSVC) add_definitions(-DCOMMONAPI_INTERNAL_COMPILATION -DCOMMONAPI_DLL_COMPILATION) add_compile_options(/EHsc /wd4996) ELSE () - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector -fasynchronous-unwind-tables -fno-omit-frame-pointer -Werror -DCOMMONAPI_INTERNAL_COMPILATION") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector -fasynchronous-unwind-tables -fno-omit-frame-pointer -Werror -DCOMMONAPI_INTERNAL_COMPILATION") ENDIF(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL}") diff --git a/include/CommonAPI/Event.hpp b/include/CommonAPI/Event.hpp index 67cc6dc..ab656f8 100644 --- a/include/CommonAPI/Event.hpp +++ b/include/CommonAPI/Event.hpp @@ -115,8 +115,11 @@ typename Event<Arguments_...>::Subscription Event<Arguments_...>::subscribe(List pendingSubscriptions_[subscription] = std::move(listeners); subscriptionMutex_.unlock(); - if (isFirstListener) + if (isFirstListener) { + if (!pendingUnsubscriptions_.empty()) + onLastListenerRemoved(listener); onFirstListenerAdded(listener); + } onListenerAdded(listener, subscription); return subscription; diff --git a/include/CommonAPI/Variant.hpp b/include/CommonAPI/Variant.hpp index 8ae9e6c..db1cf7b 100644 --- a/include/CommonAPI/Variant.hpp +++ b/include/CommonAPI/Variant.hpp @@ -710,11 +710,11 @@ const Type_ & Variant<Types_...>::get() const { if (itsType == valueType_) { return *(reinterpret_cast<const Type_ *>(&valueStorage_)); } else { -#ifdef __EXCEPTIONS +#if defined(__EXCEPTIONS) || defined(_CPPUNWIND) std::bad_cast toThrow; throw toThrow; #else - printf("SerializableVariant.hpp:%i %s: Incorrect access to variant; attempting to get type not currently contained", __LINE__, __FUNCTION__); + printf("Variant.hpp:%i %s: Incorrect access to variant; attempting to get type not currently contained", __LINE__, __FUNCTION__); abort(); #endif } diff --git a/src/CommonAPI/Runtime.cpp b/src/CommonAPI/Runtime.cpp index daf6a66..9bae2e2 100644 --- a/src/CommonAPI/Runtime.cpp +++ b/src/CommonAPI/Runtime.cpp @@ -55,7 +55,9 @@ Runtime::setProperty(const std::string &_name, const std::string &_value) { } std::shared_ptr<Runtime> Runtime::get() { +#ifndef _WIN32 std::lock_guard<std::mutex> itsLock(getMutex__); +#endif if(!theRuntimePtr__) { theRuntimePtr__ = new std::shared_ptr<Runtime>(); } |