aboutsummaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2017-11-17 16:51:02 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2017-11-17 17:02:33 +0100
commitba1f3e26cb5f5f3e95480cb5c6a519a87c4c5d88 (patch)
tree89f6418dbe20fb37a8fafd7d50069951e185f117 /src/CMakeLists.txt
parent8cbdf0a5cb4d9abf0684344a28746a21dfc36ac3 (diff)
afb-proto-ws: Fix autolock in proto-ws
Because a systemd event loop can not be reentered while evaluating an event callback, the event loop was removed from the threads. It had the effect to enter in deadlock when calling a synchronous call while in an event callback. Queueing a job solves the issue. But because using queued job has implications on libafbws, a fake job manager is added for libafbws. Change-Id: Id793bea55743790082eaab48cd4cc87f7993772a Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d531ca2e..338f1cef 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,13 +93,14 @@ INSTALL(TARGETS afb-daemon
###########################################
# build and install libafbwsc
###########################################
-ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-proto-ws.c)
+ADD_LIBRARY(afbwsc SHARED afb-ws.c afb-ws-client.c afb-wsj1.c websock.c afb-proto-ws.c jobs-fake.c)
SET_TARGET_PROPERTIES(afbwsc PROPERTIES
VERSION ${LIBAFBWSC_VERSION}
SOVERSION ${LIBAFBWSC_SOVERSION})
TARGET_LINK_LIBRARIES(afbwsc
${libsystemd_LDFLAGS}
${json-c_LDFLAGS}
+ -lpthread
-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/export-afbwsc.map
-Wl,--as-needed
-Wl,--gc-sections