Skip to content

Commit

Permalink
capicxx-core-runtime 3.1.12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
juergengehring committed Jan 25, 2018
1 parent 2c259a9 commit 2fd0625
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 8 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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}")
Expand Down
5 changes: 4 additions & 1 deletion include/CommonAPI/Event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions include/CommonAPI/Variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 2 additions & 0 deletions src/CommonAPI/Runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
}
Expand Down

0 comments on commit 2fd0625

Please sign in to comment.