Skip to content

Commit 2fd0625

Browse files
capicxx-core-runtime 3.1.12.4
1 parent 2c259a9 commit 2fd0625

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Changes
22
=======
3+
4+
v3.1.12.4
5+
- Fix calling of registered subscription status handlers for
6+
selective broadcasts
7+
38
v3.1.12.3
49
- Added copy constructor for CommonAPI CallInfo
510

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ SET(RPM_PACKAGE_VERSION "r0" CACHE STRING "rpm packet version") # used in e.g. c
4242
SET(MAX_LOG_LEVEL "DEBUG" CACHE STRING "maximum log level")
4343
message(STATUS "MAX_LOG_LEVEL is set to value: ${MAX_LOG_LEVEL}")
4444

45+
# Set a default build type if none was specified
46+
set(default_build_type "RelWithDebInfo")
4547
if(NOT CMAKE_BUILD_TYPE)
46-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
47-
"Choose the type of build, options are: Debug Release." FORCE)
48-
endif(NOT CMAKE_BUILD_TYPE)
48+
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
49+
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
50+
# Set the possible values of build type for cmake-gui
51+
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
52+
endif()
4953

5054
set(CMAKE_BUILD_TYPE_FOR_SPEC_IN "")
5155
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_FOR_SPEC_IN)
@@ -98,7 +102,7 @@ IF(MSVC)
98102
add_definitions(-DCOMMONAPI_INTERNAL_COMPILATION -DCOMMONAPI_DLL_COMPILATION)
99103
add_compile_options(/EHsc /wd4996)
100104
ELSE ()
101-
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")
105+
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")
102106
ENDIF(MSVC)
103107

104108
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCOMMONAPI_LOGLEVEL=COMMONAPI_LOGLEVEL_${MAX_LOG_LEVEL}")

include/CommonAPI/Event.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ typename Event<Arguments_...>::Subscription Event<Arguments_...>::subscribe(List
115115
pendingSubscriptions_[subscription] = std::move(listeners);
116116
subscriptionMutex_.unlock();
117117

118-
if (isFirstListener)
118+
if (isFirstListener) {
119+
if (!pendingUnsubscriptions_.empty())
120+
onLastListenerRemoved(listener);
119121
onFirstListenerAdded(listener);
122+
}
120123
onListenerAdded(listener, subscription);
121124

122125
return subscription;

include/CommonAPI/Variant.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,11 @@ const Type_ & Variant<Types_...>::get() const {
710710
if (itsType == valueType_) {
711711
return *(reinterpret_cast<const Type_ *>(&valueStorage_));
712712
} else {
713-
#ifdef __EXCEPTIONS
713+
#if defined(__EXCEPTIONS) || defined(_CPPUNWIND)
714714
std::bad_cast toThrow;
715715
throw toThrow;
716716
#else
717-
printf("SerializableVariant.hpp:%i %s: Incorrect access to variant; attempting to get type not currently contained", __LINE__, __FUNCTION__);
717+
printf("Variant.hpp:%i %s: Incorrect access to variant; attempting to get type not currently contained", __LINE__, __FUNCTION__);
718718
abort();
719719
#endif
720720
}

src/CommonAPI/Runtime.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ Runtime::setProperty(const std::string &_name, const std::string &_value) {
5555
}
5656

5757
std::shared_ptr<Runtime> Runtime::get() {
58+
#ifndef _WIN32
5859
std::lock_guard<std::mutex> itsLock(getMutex__);
60+
#endif
5961
if(!theRuntimePtr__) {
6062
theRuntimePtr__ = new std::shared_ptr<Runtime>();
6163
}

0 commit comments

Comments
 (0)