From ffb991e7afe3b801b4dba988d27919d9f111bcbb Mon Sep 17 00:00:00 2001 From: "jyong2.kim" Date: Tue, 7 Jul 2015 20:00:40 +0900 Subject: [PATCH] Fix build fail of broker module. fix syntax error. add expiryTimer's script in common sconscript. Change-Id: I396c2249cc68568e81885f1e05a40cccf7f68662 Signed-off-by: jyong2.kim Reviewed-on: https://gerrit.iotivity.org/gerrit/1560 Reviewed-by: Hun-je Yeon Tested-by: jenkins-iotivity Reviewed-by: kwon doil Reviewed-by: Uze Choi --- service/resource-manipulation/modules/common/SConscript | 1 + service/resource-manipulation/modules/resourceBroker/SConscript | 1 + .../modules/resourceBroker/src/ResourcePresence.cpp | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/service/resource-manipulation/modules/common/SConscript b/service/resource-manipulation/modules/common/SConscript index 70586b3..7f07604 100644 --- a/service/resource-manipulation/modules/common/SConscript +++ b/service/resource-manipulation/modules/common/SConscript @@ -26,5 +26,6 @@ import platform Import('env') SConscript('primitiveResource/SConscript') +SConscript('expiryTimer/SConscript') diff --git a/service/resource-manipulation/modules/resourceBroker/SConscript b/service/resource-manipulation/modules/resourceBroker/SConscript index 6107e36..10099b2 100755 --- a/service/resource-manipulation/modules/resourceBroker/SConscript +++ b/service/resource-manipulation/modules/resourceBroker/SConscript @@ -44,6 +44,7 @@ target_os = env.get('TARGET_OS') resourcebroker_env.AppendUnique(CPPPATH = ['include']) resourcebroker_env.AppendUnique(CPPPATH = ['../common/primitiveResource/include']) resourcebroker_env.AppendUnique(CPPPATH = ['../common/expiryTimer/include']) +resourcebroker_env.AppendUnique(CPPPATH = ['../common/expiryTimer/src']) resourcebroker_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) resourcebroker_env.PrependUnique(LIBS = ['service_common', 'ExpiryTimer', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap']) diff --git a/service/resource-manipulation/modules/resourceBroker/src/ResourcePresence.cpp b/service/resource-manipulation/modules/resourceBroker/src/ResourcePresence.cpp index a64d5ee..eccb990 100755 --- a/service/resource-manipulation/modules/resourceBroker/src/ResourcePresence.cpp +++ b/service/resource-manipulation/modules/resourceBroker/src/ResourcePresence.cpp @@ -178,9 +178,10 @@ namespace OIC time_t currentTime; time(¤tTime); - currentTime+=0L; + currentTime += 0L; - if((receivedTime == 0L) || ((receivedTime+SAFE_TIME) > currentTime)) + if((receivedTime.load(std::memory_order_relaxed) == 0) || + ((receivedTime + SAFE_TIME) > currentTime )) { return NULL; } -- 2.7.4