From: jyong2.kim Date: Tue, 7 Jul 2015 11:00:40 +0000 (+0900) Subject: Fix build fail of broker module. X-Git-Tag: 1.2.0+RC1~1430^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ffb991e7afe3b801b4dba988d27919d9f111bcbb;p=platform%2Fupstream%2Fiotivity.git 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 --- 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; }