This brings IoTivity to version 0.9.2 in addition it does the following: * split C and C++ Stack into two packages * backport some patches which are adding missing dependencies to the shared libs * remove patches merged upstream * add some other patches fixing some problems, most of them are already merged upstream * activate security and logging support Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>lilik-openwrt-22.03
@ -1,32 +0,0 @@ | |||||
From 62c0a14ccd333d0e55fc431f151253a72a2836d0 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Mon, 8 Jun 2015 21:57:52 +0200 | |||||
Subject: [PATCH] libcoap: fix big endian problems | |||||
When this is build for a big endian Linux system WORDS_BIGENDIAN was | |||||
not be set. This patch sets it correctly so it will not generate broken | |||||
code on big endian systems. | |||||
This was tested on MIPS BE 32 Bit. | |||||
Change-Id: I59dd07d8020c553318e2aa43894a2185fe9b9286 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1219 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
--- | |||||
resource/csdk/connectivity/lib/libcoap-4.1.1/config.h | 4 ++-- | |||||
1 file changed, 2 insertions(+), 2 deletions(-) | |||||
--- a/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h | |||||
+++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h | |||||
@@ -135,8 +135,8 @@ | |||||
# define WORDS_BIGENDIAN 1 | |||||
# endif | |||||
#else | |||||
-# ifndef WORDS_BIGENDIAN | |||||
-/* # undef WORDS_BIGENDIAN */ | |||||
+# if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) | |||||
+# define WORDS_BIGENDIAN 1 | |||||
# endif | |||||
#endif | |||||
@ -1,35 +0,0 @@ | |||||
From 7189bc088f558945972d82a9a3427001cb20000a Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Mon, 8 Jun 2015 22:03:19 +0200 | |||||
Subject: [PATCH] cdsk: fix big endian problem | |||||
Without this patch the client will endianes swap the port number when | |||||
sending the detailed request after it got the answer for his multicast | |||||
get. Use the same method for storing the port number in the address | |||||
array in ever part of the code and do not use memcpy and manual | |||||
bytewise coping mixed over the code. memcpy was used once and byte wise | |||||
copy was used twice so I choose the majority. | |||||
This was tested on MIPS BE 32 Bit. | |||||
Change-Id: Ib486171987004d10209d2bbf6b1d9ada75235651 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1220 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Doug Hudson <douglas.hudson@intel.com> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
--- | |||||
resource/csdk/stack/src/ocstack.c | 3 ++- | |||||
1 file changed, 2 insertions(+), 1 deletion(-) | |||||
--- a/resource/csdk/stack/src/ocstack.c | |||||
+++ b/resource/csdk/stack/src/ocstack.c | |||||
@@ -723,7 +723,8 @@ OCStackResult UpdateResponseAddr(OCDevAd | |||||
address->addr[i] = atoi(tok); | |||||
} | |||||
- memcpy(&address->addr[4], &endPoint->addressInfo.IP.port, sizeof(uint16_t)); | |||||
+ address->addr[4] = (uint8_t)endPoint->addressInfo.IP.port; | |||||
+ address->addr[5] = (uint8_t)(endPoint->addressInfo.IP.port >> 8); | |||||
ret = OC_STACK_OK; | |||||
exit: |
@ -1,11 +0,0 @@ | |||||
--- a/service/protocol-plugin/sample-app/linux/SConscript | |||||
+++ b/service/protocol-plugin/sample-app/linux/SConscript | |||||
@@ -41,7 +41,7 @@ if target_os not in ['windows', 'winrt'] | |||||
sample_env.AppendUnique(LIBS = ['oc', 'oc_logger', 'octbstack', | |||||
'connectivity_abstraction', 'coap', | |||||
- 'ppm', 'pmimpl', 'dl']) | |||||
+ 'ppm', 'boost_system', 'pmimpl', 'dl']) | |||||
if env.get('SECURED') == '1': | |||||
sample_env.AppendUnique(LIBS = ['tinydtls']) |
@ -1,11 +0,0 @@ | |||||
--- a/service/things-manager/sampleapp/linux/configuration/SConscript | |||||
+++ b/service/things-manager/sampleapp/linux/configuration/SConscript | |||||
@@ -57,7 +57,7 @@ conserver = linux_sample_env.Program('co | |||||
conclient = linux_sample_env.Program('con-client', 'con-client.cpp') | |||||
bootstrapserver = linux_sample_env.Program('bootstrapserver', 'bootstrapserver.cpp') | |||||
Alias("ConServerApp", conserver) | |||||
-Alias("ConCleintApp", conclient) | |||||
+Alias("ConClientApp", conclient) | |||||
Alias("BootstrapServerApp", bootstrapserver) | |||||
env.AppendTarget('ConServerApp') | |||||
env.AppendTarget('ConClientApp') |
@ -1,14 +0,0 @@ | |||||
--- a/resource/csdk/stack/include/octypes.h | |||||
+++ b/resource/csdk/stack/include/octypes.h | |||||
@@ -35,9 +35,9 @@ extern "C" { | |||||
//Don't want to expose to application layer that lower level stack is using CoAP. | |||||
/// Authority + URI string to prefix well known queries | |||||
-#define OC_WELL_KNOWN_QUERY "224.0.1.187:5683/oc/core" | |||||
+#define OC_WELL_KNOWN_QUERY "/oc/core" | |||||
#define OC_MULTICAST_DISCOVERY_URI "/oc/core" | |||||
-#define OC_EXPLICIT_DEVICE_DISCOVERY_URI "224.0.1.187:5683/oc/core/d?rt=core.led" | |||||
+#define OC_EXPLICIT_DEVICE_DISCOVERY_URI "/oc/core/d?rt=core.led" | |||||
/// Multicast address and port string to prefix multicast queries | |||||
#define OC_MULTICAST_PREFIX "224.0.1.187:5683" | |||||
/// IP Multicast address to use for multicast requests |
@ -0,0 +1,49 @@ | |||||
From b13839cceaae97d7d23b54586da1ad7ac85ab2b6 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 20:50:39 +0200 | |||||
Subject: [PATCH] liboc: add missing depending library | |||||
liboc.so depends on liboctbstack.so, liboc_logger.so and pthread, this | |||||
patch adds these dependencies to the build. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: I971b45669adef31dc9cca719884ebeb74aaf735e | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1794 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
--- | |||||
resource/src/SConscript | 14 ++++++++------ | |||||
1 file changed, 8 insertions(+), 6 deletions(-) | |||||
--- a/resource/src/SConscript | |||||
+++ b/resource/src/SConscript | |||||
@@ -40,18 +40,20 @@ oclib_env.AppendUnique(CPPPATH = [ | |||||
'../csdk/connectivity/lib/libcoap-4.1.1' | |||||
]) | |||||
+oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
+ | |||||
+oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger']) | |||||
+ | |||||
target_os = env.get('TARGET_OS') | |||||
+if target_os == 'linux': | |||||
+ oclib_env.AppendUnique(LIBS = ['pthread']) | |||||
+ | |||||
if target_os not in ['windows', 'winrt']: | |||||
oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC']) | |||||
if target_os == 'android': | |||||
oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
- oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
- oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log']) | |||||
- | |||||
-if target_os in ['darwin', 'ios']: | |||||
- oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
- oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger']) | |||||
+ oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log']) | |||||
###################################################################### | |||||
# Source files and Targets |
@ -0,0 +1,42 @@ | |||||
From 0143dfaa7e6dace845412e97ebbf697d273b0d10 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:06:52 +0200 | |||||
Subject: [PATCH] things-manager: libTGMSDKLibrary.so: add missing depending | |||||
library | |||||
libTGMSDKLibrary.so also depends on liboc.so, liboctbstack.so and | |||||
pthread, this patch adds these dependencies to the build. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: I174b38e747be247fc25544db629f8ad2b7eb5ef5 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1795 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
service/things-manager/SConscript | 5 ++++- | |||||
1 file changed, 4 insertions(+), 1 deletion(-) | |||||
--- a/service/things-manager/SConscript | |||||
+++ b/service/things-manager/SConscript | |||||
@@ -35,14 +35,17 @@ target_os = env.get('TARGET_OS') | |||||
###################################################################### | |||||
things_manager_env.AppendUnique(CPPPATH = ['../../extlibs/timer', 'sdk/inc', 'sdk/src']) | |||||
+things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack']) | |||||
+ | |||||
if target_os not in ['windows', 'winrt']: | |||||
things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) | |||||
if target_os != 'android': | |||||
things_manager_env.AppendUnique(CXXFLAGS = ['-pthread']) | |||||
+ things_manager_env.AppendUnique(LIBS = ['pthread']) | |||||
if target_os == 'android': | |||||
things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
- things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack', 'gnustl_shared']) | |||||
+ things_manager_env.PrependUnique(LIBS = ['gnustl_shared']) | |||||
###################################################################### | |||||
# Source files and Targets |
@ -0,0 +1,32 @@ | |||||
From b52307797b91d7448a72874e4da7bed30c27a4f5 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:29:14 +0200 | |||||
Subject: [PATCH] soft-sensor-manager: libSSMCore.so: add missing depending | |||||
library | |||||
libSSMCore.so also depends on libdl.so, this patch adds these | |||||
dependencies to the build. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: I76faff46fe96caef75fb6673c7e83d62b15b8489 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1796 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
service/soft-sensor-manager/SConscript | 2 +- | |||||
1 file changed, 1 insertion(+), 1 deletion(-) | |||||
--- a/service/soft-sensor-manager/SConscript | |||||
+++ b/service/soft-sensor-manager/SConscript | |||||
@@ -157,7 +157,7 @@ static_libssmcore = ssmcore_env.StaticLi | |||||
ssmcore_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
ssmcore_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger', | |||||
- 'connectivity_abstraction', 'coap']) | |||||
+ 'connectivity_abstraction', 'coap', 'dl']) | |||||
shared_libssmcore = ssmcore_env.SharedLibrary( | |||||
target = 'SSMCore', |
@ -0,0 +1,39 @@ | |||||
From 60b43aed7e479bc6d7252f0dba2542fe7aab9195 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:38:02 +0200 | |||||
Subject: [PATCH] mqtt-fan: libmosquittopp.so: add missing depending library | |||||
libmosquittopp.so also depends on libpthread.so, this patch adds these | |||||
dependencies to the build. In addition it puts the dependency to | |||||
mosquitto to the beginning of the list. This is needed because | |||||
mosquitto is a statically linked lib and it also has unresolved | |||||
symbols, but gcc only searches the dynamic libs defined after the | |||||
static for unresolved symbols in the static lib. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: I866a46305c31d37cf706b9f2b965e843c35c5667 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1797 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
.../plugins/mqtt-fan/lib/cpp/SConscript | 5 ++++- | |||||
1 file changed, 4 insertions(+), 1 deletion(-) | |||||
--- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript | |||||
+++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript | |||||
@@ -16,7 +16,10 @@ mosquittopp_env.AppendUnique(CPPPATH = [ | |||||
if target_os not in ['windows', 'winrt']: | |||||
mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC']) | |||||
-mosquittopp_env.AppendUnique(LIBS = ['mosquitto', 'ssl', 'crypto']) | |||||
+if target_os == 'linux': | |||||
+ mosquittopp_env.AppendUnique(LIBS = ['pthread']) | |||||
+ | |||||
+mosquittopp_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto']) | |||||
###################################################################### | |||||
# Source files and Targets | |||||
###################################################################### |
@ -0,0 +1,42 @@ | |||||
From d1fb4c055f168e68ffd2d5596eef8d96f6c6cfae Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:41:09 +0200 | |||||
Subject: [PATCH] protocol-plugin: libfanserver_mqtt_plugin.so and | |||||
liblightserver_mqtt_plugin.so add missing depending library | |||||
libfanserver_mqtt_plugin.so and liblightserver_mqtt_plugin.so are also | |||||
depending on liboc.so and libcrypto.so, this patch adds these | |||||
dependencies to the build. In addition it puts the dependency to | |||||
mosquitto to the beginning of the list. This is needed because | |||||
mosquitto is a statically linked lib and it also has unresolved | |||||
symbols, but gcc only searches the dynamic libs defined after the | |||||
static for unresolved symbols in the static lib. | |||||
mosquitto was only build as a static linked library so we can use the | |||||
normal LIBS mechanism and it will be statically linked. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: Ia130827d04bd3bb1a8863fc64d0097a076edc751 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1798 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Younghyun Joo <yh_.joo@samsung.com> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
service/protocol-plugin/plugins/SConscript | 3 +-- | |||||
1 file changed, 1 insertion(+), 2 deletions(-) | |||||
--- a/service/protocol-plugin/plugins/SConscript | |||||
+++ b/service/protocol-plugin/plugins/SConscript | |||||
@@ -47,8 +47,7 @@ if target_os == 'android': | |||||
plugins_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
plugins_env.AppendUnique(LIBS = ['gnustl_shared']) | |||||
-plugins_env.AppendUnique(LIBS = [File(env.get('BUILD_DIR') + '/libmosquitto.a'), | |||||
- 'mosquitto', 'ssl', 'rt']) | |||||
+plugins_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto', 'rt', 'oc']) | |||||
###################################################################### |
@ -0,0 +1,69 @@ | |||||
From 2993af980993ebb70b686b1a521d98d26e85cfc2 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke@hauke-m.de> | |||||
Date: Tue, 21 Jul 2015 20:55:50 +0200 | |||||
Subject: [PATCH] resource-manipulation: libserver_builder.so add missing | |||||
depending library | |||||
libserver_builder.so is also depending on liboc.so and | |||||
librcs_common.so, this patch adds these dependencies to the build. | |||||
liboctbstack.so is only needed when LOGGING=true is set. Without | |||||
liboctbstack.so libserver_builder.so misses the dependencies to the | |||||
OCLog and OCLogv symbols. | |||||
Add LIBPATH to make sure the libs will be found, this fixes a problem | |||||
in some jenkins tests. | |||||
pthread is added two times, once should be enough. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: I6af126eb4af975b7231d01df922885c7dec5fc56 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1799 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
.../src/serverBuilder/SConscript | 11 ++++++----- | |||||
1 file changed, 6 insertions(+), 5 deletions(-) | |||||
--- a/service/resource-encapsulation/src/serverBuilder/SConscript | |||||
+++ b/service/resource-encapsulation/src/serverBuilder/SConscript | |||||
@@ -47,6 +47,8 @@ server_builder_env.AppendUnique(CPPPATH | |||||
server_builder_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs', 'include']) | |||||
+server_builder_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
+ | |||||
if target_os not in ['windows', 'winrt']: | |||||
server_builder_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall']) | |||||
if target_os != 'android': | |||||
@@ -56,7 +58,10 @@ if target_os == 'android': | |||||
server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log']) | |||||
-server_builder_env.AppendUnique(LIBS = ['dl']) | |||||
+server_builder_env.AppendUnique(LIBS = ['dl', 'oc', 'rcs_common']) | |||||
+ | |||||
+if env.get('LOGGING'): | |||||
+ server_builder_env.AppendUnique(LIBS = ['octbstack']) | |||||
if not release: | |||||
server_builder_env.AppendUnique(CXXFLAGS = ['--coverage']) | |||||
@@ -77,7 +82,6 @@ server_builder_env.InstallTarget([server | |||||
###################################################################### | |||||
server_builder_test_env = server_builder_env.Clone(); | |||||
-server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
server_builder_test_env.AppendUnique(CPPPATH = [ | |||||
env.get('SRC_DIR')+'/extlibs/hippomocks-master', | |||||
gtest_dir + '/include', | |||||
@@ -89,8 +93,6 @@ gtest_main = File(gtest_dir + '/lib/.lib | |||||
server_builder_test_env.PrependUnique(LIBS = [ | |||||
'rcs_server', | |||||
- 'rcs_common', | |||||
- 'oc', | |||||
'octbstack', | |||||
'oc_logger', | |||||
'connectivity_abstraction', |
@ -0,0 +1,54 @@ | |||||
From c02a2b8ad3efb0b59392b1c2d441e3f7144c1fda Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:45:40 +0200 | |||||
Subject: [PATCH] csdk: remove dependency to liboc_logger.so in c code | |||||
The liboc_logger.so is only used by the c++ part and not by the c part, | |||||
remove it from the c only part. | |||||
Change-Id: Ib0894974de8ef7150401f02fbd0ea864d1d6f2cd | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1801 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Charlie Lenahan <charlie.lenahan@intel.com> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
--- | |||||
resource/csdk/connectivity/test/SConscript | 3 --- | |||||
.../samples/linux/SimpleClientServer/SConscript | 2 +- | |||||
.../csdk/stack/samples/linux/secure/SConscript | 2 +- | |||||
3 files changed, 2 insertions(+), 5 deletions(-) | |||||
--- a/resource/csdk/connectivity/test/SConscript | |||||
+++ b/resource/csdk/connectivity/test/SConscript | |||||
@@ -58,9 +58,6 @@ target_os = env.get('TARGET_OS') | |||||
if target_os not in ['arduino', 'darwin', 'ios']: | |||||
catest_env.AppendUnique(LIBS=['rt']) | |||||
-if target_os != 'darwin': | |||||
- catest_env.PrependUnique(LIBS = ['oc_logger']) | |||||
- | |||||
if env.get('SECURED') == '1': | |||||
catest_env.AppendUnique(LIBS = ['tinydtls']) | |||||
--- a/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript | |||||
+++ b/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript | |||||
@@ -41,7 +41,7 @@ samples_env.AppendUnique(LIBPATH = [env. | |||||
if target_os in ['darwin', 'ios']: | |||||
samples_env.PrependUnique(LIBS = ['m','octbstack', 'ocsrm', 'connectivity_abstraction','coap' ]) | |||||
elif target_os not in ['arduino']: | |||||
- samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'oc_logger', 'connectivity_abstraction', 'coap']) | |||||
+ samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap']) | |||||
samples_env.AppendUnique(LIBS = ['rt']) | |||||
if env.get('SECURED') == '1': | |||||
--- a/resource/csdk/stack/samples/linux/secure/SConscript | |||||
+++ b/resource/csdk/stack/samples/linux/secure/SConscript | |||||
@@ -41,7 +41,7 @@ if target_os not in ['windows', 'winrt'] | |||||
samples_env.AppendUnique(LIBS = ['-lpthread']) | |||||
samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) | |||||
-samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'oc_logger', 'connectivity_abstraction', 'coap']) | |||||
+samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'connectivity_abstraction', 'coap']) | |||||
if env.get('SECURED') == '1': | |||||
samples_env.AppendUnique(LIBS = ['tinydtls']) | |||||
@ -0,0 +1,37 @@ | |||||
From 32e39b18fb4fd01408898a0ccba751f0033800c7 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke@hauke-m.de> | |||||
Date: Wed, 22 Jul 2015 23:05:19 +0200 | |||||
Subject: [PATCH] csdk: libconnectivity_abstraction.so: add missing depending | |||||
library | |||||
libconnectivity_abstractionso depends on libcoap.so and librt.so when | |||||
build as shared lib, which is the case for the Tizen build. This patch | |||||
adds these dependencies to the build. | |||||
Without this the dynamic loader will not automatically load these | |||||
libraries and it could result in unresolved dependencies at runtime. | |||||
Change-Id: Ib972be2b766d7fbccac9b246ae6f11e6182af94c | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1825 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
Tested-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
resource/csdk/connectivity/src/SConscript | 5 +++++ | |||||
1 file changed, 5 insertions(+) | |||||
--- a/resource/csdk/connectivity/src/SConscript | |||||
+++ b/resource/csdk/connectivity/src/SConscript | |||||
@@ -108,6 +108,11 @@ if 'BLE' in ca_transport: | |||||
print "Include path is %s" % env.get('CPPPATH') | |||||
print "Files path is %s" % env.get('CA_SRC') | |||||
if ca_os in ['android', 'tizen']: | |||||
+ env.AppendUnique(LIBS = ['coap']) | |||||
+ if env.get('SECURED') == '1': | |||||
+ env.AppendUnique(LIBS = ['tinydtls']) | |||||
+ if ca_os != 'android': | |||||
+ env.AppendUnique(LIBS = ['rt']) | |||||
calib = env.SharedLibrary('connectivity_abstraction', env.get('CA_SRC')) | |||||
else: | |||||
calib = env.StaticLibrary('connectivity_abstraction', env.get('CA_SRC')) |
@ -0,0 +1,227 @@ | |||||
From 2533c88e18de689dbb26cfd4d585b1a991533c76 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Tue, 21 Jul 2015 22:00:18 +0200 | |||||
Subject: [PATCH] build: make build fail if unresolved symbols found | |||||
gcc links shared libs also when there are still some unresolved | |||||
symbols, you have to specify it explicitly to make it fail in such | |||||
cases. I think a compiler should fail in such cases otherwise | |||||
someone will add some not intended dependencies or some existing | |||||
dependencies are not getting declared. | |||||
This patch makes gcc fail in such cases. I have only activated this for | |||||
libs build in a Linux build and explicitly deactivates it for windows | |||||
(does this even work at all?) This should be build tested with Android | |||||
also. | |||||
This was build tested for Linux and Android. | |||||
This patch depends on some other patches I send which are fixing the | |||||
problems I found with this change. | |||||
Change-Id: I9ab79896ca2e86e9226cd9b39060a0763ef89694 | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/1802 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com> | |||||
Reviewed-by: Uze Choi <uzchoi@samsung.com> | |||||
--- | |||||
extlibs/expat/SConscript | 3 +++ | |||||
.../csdk/connectivity/samples/android/SConscript | 1 + | |||||
resource/csdk/connectivity/src/SConscript | 3 +++ | |||||
resource/oc_logger/SConscript | 3 +++ | |||||
resource/src/SConscript | 3 +++ | |||||
service/notification-manager/SConscript | 3 +++ | |||||
service/protocol-plugin/plugin-manager/SConscript | 4 ++++ | |||||
.../plugin-manager/src/Android/jni/SConscript | 1 + | |||||
service/protocol-plugin/plugins/SConscript | 3 +++ | |||||
.../plugins/mqtt-fan/lib/cpp/SConscript | 3 +++ | |||||
.../resource-manipulation/src/common/SConscript | 5 ++++- | |||||
.../src/resourceContainer/SConscript | 3 +++ | |||||
.../src/resourceContainer/unittests/SConscript | 3 +++ | |||||
.../src/serverBuilder/SConscript | 3 +++ | |||||
service/soft-sensor-manager/SConscript | 3 +++ | |||||
service/things-manager/SConscript | 3 +++ | |||||
service/things-manager/sdk/java/jni/SConscript | 3 +++ | |||||
17 files changed, 49 insertions(+), 1 deletion(-) | |||||
--- a/extlibs/expat/SConscript | |||||
+++ b/extlibs/expat/SConscript | |||||
@@ -35,6 +35,9 @@ if target_os not in ['windows', 'winrt'] | |||||
'-fexceptions', '-fno-common']) | |||||
expat_env.AppendUnique(CPPDEFINES = ['HAVE_EXPAT_CONFIG_H']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ expat_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
###################################################################### | |||||
# Source files and Targets | |||||
###################################################################### | |||||
--- a/resource/csdk/connectivity/src/SConscript | |||||
+++ b/resource/csdk/connectivity/src/SConscript | |||||
@@ -27,6 +27,9 @@ env.AppendUnique(CPPPATH = [ os.path.joi | |||||
if ca_os not in ['arduino', 'windows', 'winrt']: | |||||
env.AppendUnique(CPPDEFINES = ['WITH_POSIX']) | |||||
+if ca_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if ca_os in ['darwin','ios']: | |||||
env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE']) | |||||
--- a/resource/oc_logger/SConscript | |||||
+++ b/resource/oc_logger/SConscript | |||||
@@ -42,6 +42,9 @@ if target_os not in ['arduino', 'windows | |||||
liboc_logger_env.AppendUnique(CFLAGS = ['-Wall', '-std=c99', '-fPIC']) | |||||
liboc_logger_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x', '-fPIC']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ liboc_logger_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
###################################################################### | |||||
# Source files and Targets | |||||
###################################################################### | |||||
--- a/resource/src/SConscript | |||||
+++ b/resource/src/SConscript | |||||
@@ -51,6 +51,9 @@ if target_os == 'linux': | |||||
if target_os not in ['windows', 'winrt']: | |||||
oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ oclib_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'android': | |||||
oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log']) | |||||
--- a/service/notification-manager/SConscript | |||||
+++ b/service/notification-manager/SConscript | |||||
@@ -65,6 +65,9 @@ notimgr_env.PrependUnique(LIBS = [ | |||||
if target_os not in ['windows', 'winrt']: | |||||
notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ notimgr_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'linux': | |||||
notimgr_env.AppendUnique(LIBS = ['pthread']) | |||||
--- a/service/protocol-plugin/plugin-manager/SConscript | |||||
+++ b/service/protocol-plugin/plugin-manager/SConscript | |||||
@@ -61,6 +61,10 @@ if target_os == 'android': | |||||
pmimpl_env = plugin_manager_env.Clone() | |||||
pmimpl_env.PrependUnique(CCFLAGS = ['-fPIC']) | |||||
pmimpl_env.PrependUnique(LIBS = File(env.get('BUILD_DIR') + '/libcpluff.a')) | |||||
+ | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ pmimpl_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
pmimpl = pmimpl_env.SharedLibrary('pmimpl', pmimpl_src) | |||||
plugin_manager_env.InstallTarget([ppm, pmimpl], 'libppm') | |||||
--- a/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript | |||||
+++ b/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript | |||||
@@ -23,6 +23,7 @@ ppm_jni_env.PrependUnique(LIBS = ['pmimp | |||||
ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/src']) | |||||
ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/../lib/cpluff/libcpluff']) | |||||
ppm_jni_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/rapidxml']) | |||||
+ppm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
###################################################################### | |||||
# Source files and Targets | |||||
--- a/service/protocol-plugin/plugins/SConscript | |||||
+++ b/service/protocol-plugin/plugins/SConscript | |||||
@@ -40,6 +40,9 @@ if target_os not in ['windows', 'winrt'] | |||||
plugins_env.PrependUnique(CCFLAGS = ['-fPIC']) | |||||
plugins_env.AppendUnique(LINKFLAGS = ['-fPIC']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ plugins_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os not in ['arduino', 'android']: | |||||
plugins_env.AppendUnique(LIBS = ['pthread']) | |||||
--- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript | |||||
+++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript | |||||
@@ -16,6 +16,9 @@ mosquittopp_env.AppendUnique(CPPPATH = [ | |||||
if target_os not in ['windows', 'winrt']: | |||||
mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ mosquittopp_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'linux': | |||||
mosquittopp_env.AppendUnique(LIBS = ['pthread']) | |||||
--- a/service/resource-encapsulation/src/resourceContainer/SConscript | |||||
+++ b/service/resource-encapsulation/src/resourceContainer/SConscript | |||||
@@ -88,6 +88,9 @@ if target_os not in ['windows', 'winrt'] | |||||
if target_os != 'android': | |||||
resource_container_env.AppendUnique(CXXFLAGS = ['-pthread']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ resource_container_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'android': | |||||
resource_container_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
resource_container_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log']) | |||||
--- a/service/resource-encapsulation/src/resourceContainer/unittests/SConscript | |||||
+++ b/service/resource-encapsulation/src/resourceContainer/unittests/SConscript | |||||
@@ -144,6 +144,9 @@ if int(containerJavaSupport): | |||||
test_bundle_env = container_gtest_env.Clone() | |||||
test_bundle_env.AppendUnique(CCFLAGS = ['-fPIC']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ test_bundle_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
TEST_BUNDLE_DIR = 'TestBundle/' | |||||
test_bundle_env.AppendUnique(CPPPATH = [ | |||||
TEST_BUNDLE_DIR + 'include', | |||||
--- a/service/resource-encapsulation/src/serverBuilder/SConscript | |||||
+++ b/service/resource-encapsulation/src/serverBuilder/SConscript | |||||
@@ -54,6 +54,9 @@ if target_os not in ['windows', 'winrt'] | |||||
if target_os != 'android': | |||||
server_builder_env.AppendUnique(CXXFLAGS = ['-pthread']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ server_builder_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'android': | |||||
server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log']) | |||||
--- a/service/soft-sensor-manager/SConscript | |||||
+++ b/service/soft-sensor-manager/SConscript | |||||
@@ -45,6 +45,9 @@ if target_os not in ['windows', 'winrt'] | |||||
soft_sensor_manager_env.AppendUnique(LIBS = ['pthread']) | |||||
soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-pthread']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ soft_sensor_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'android': | |||||
soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_shared']) | |||||
--- a/service/things-manager/SConscript | |||||
+++ b/service/things-manager/SConscript | |||||
@@ -43,6 +43,9 @@ if target_os not in ['windows', 'winrt'] | |||||
things_manager_env.AppendUnique(CXXFLAGS = ['-pthread']) | |||||
things_manager_env.AppendUnique(LIBS = ['pthread']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ things_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
if target_os == 'android': | |||||
things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) | |||||
things_manager_env.PrependUnique(LIBS = ['gnustl_shared']) | |||||
--- a/service/things-manager/sdk/java/jni/SConscript | |||||
+++ b/service/things-manager/sdk/java/jni/SConscript | |||||
@@ -27,6 +27,9 @@ tm_jni_env.AppendUnique(CPPPATH = [tm_sd | |||||
tm_jni_env.AppendUnique(CPPPATH = [base_jni]) | |||||
tm_jni_env.AppendUnique(CPPPATH = ['tm/inc', 'jniutil/inc', extlibs+'/timer/']) | |||||
+if target_os not in ['darwin', 'ios', 'windows', 'winrt']: | |||||
+ tm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined']) | |||||
+ | |||||
###################################################################### | |||||
# Source files and Targets | |||||
###################################################################### |
@ -0,0 +1,29 @@ | |||||
From a8f5ed3ff337bce5222967fdf8c0b475fd28e74a Mon Sep 17 00:00:00 2001 | |||||
From: John Light <john.j.light@intel.com> | |||||
Date: Thu, 30 Jul 2015 15:14:07 -0700 | |||||
Subject: [PATCH] Avoid Segv by testing address field before using it. | |||||
sIssue reported off dev list by Gabriel Schulhof. | |||||
Change-Id: Ifa529da59fb784fd5cdef6ca333635cf99ed1f59 | |||||
Signed-off-by: John Light <john.j.light@intel.com> | |||||
Reviewed-on: https://gerrit.iotivity.org/gerrit/2160 | |||||
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org> | |||||
Reviewed-by: Erich Keane <erich.keane@intel.com> | |||||
--- | |||||
.../src/ip_adapter/linux/caipnwmonitor.c | 4 ++++ | |||||
1 file changed, 4 insertions(+) | |||||
--- a/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c | |||||
+++ b/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c | |||||
@@ -57,6 +57,10 @@ u_arraylist_t *CAIPGetInterfaceInformati | |||||
struct ifaddrs *ifa = NULL; | |||||
for (ifa = ifp; ifa; ifa = ifa->ifa_next) | |||||
{ | |||||
+ if (!ifa->ifa_addr) | |||||
+ { | |||||
+ continue; | |||||
+ } | |||||
int family = ifa->ifa_addr->sa_family; | |||||
if ((ifa->ifa_flags & IFF_LOOPBACK) || (AF_INET != family && AF_INET6 != family)) | |||||
{ |
@ -0,0 +1,29 @@ | |||||
From e767f892e7736008b60f85d2c2690d660661814b Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Thu, 13 Aug 2015 15:03:11 +0200 | |||||
Subject: [PATCH] resource-encapsulation: fix build without curl | |||||
The hue plugin needs curl and it should only be build when libcurl is available. | |||||
Without this patch, the build fails without curl installed, this patch fixes the problem and makes the build worm without curl and without the hue stuff. | |||||
Without this patch I am getting this error message: | |||||
scons: *** | |||||
File "/service/third_party_libs.scons", line 50, in ? | |||||
Change-Id: I5b4da555ff84b9b605cc6c119990d60ff670bd0d | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
--- | |||||
.../src/resourceContainer/SConscript | 2 +- | |||||
1 file changed, 1 insertion(+), 1 deletion(-) | |||||
--- a/service/resource-encapsulation/src/resourceContainer/SConscript | |||||
+++ b/service/resource-encapsulation/src/resourceContainer/SConscript | |||||
@@ -177,7 +177,7 @@ else: | |||||
HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src) | |||||
hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle') | |||||
- lib_env = conf2.Finish() | |||||
+lib_env = conf2.Finish() | |||||
###################################################################### | |||||
# build resource container unit tests |
@ -0,0 +1,22 @@ | |||||
--- a/resource/csdk/security/provisioning/sample/SConscript | |||||
+++ b/resource/csdk/security/provisioning/sample/SConscript | |||||
@@ -53,7 +53,7 @@ provisioning_env.PrependUnique(LIBS = [' | |||||
if env.get('SECURED') == '1': | |||||
provisioning_env.AppendUnique(LIBS = ['tinydtls']) | |||||
-provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); | |||||
+#provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); | |||||
provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG']) | |||||
--- a/resource/csdk/security/provisioning/SConscript | |||||
+++ b/resource/csdk/security/provisioning/SConscript | |||||
@@ -62,7 +62,7 @@ provisioning_env.PrependUnique(LIBS = [' | |||||
provisioning_env.AppendUnique(LIBS = ['tinydtls']) | |||||
-provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); | |||||
+#provisioning_env.ParseConfig('pkg-config --libs glib-2.0'); | |||||
if target_os == 'android': | |||||
provisioning_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions']) |
@ -0,0 +1,44 @@ | |||||
From ce27d50b9c11386242487852f14b025ed6c67701 Mon Sep 17 00:00:00 2001 | |||||
From: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
Date: Wed, 19 Aug 2015 16:47:21 +0200 | |||||
Subject: [PATCH 14/14] examples: OICMiddle: try to load security | |||||
configuration by default | |||||
Load the security configuration from the default location by default. | |||||
When it is not found security will just not work. | |||||
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com> | |||||
--- | |||||
examples/OICMiddle/OICMiddle.cpp | 9 ++++++++- | |||||
examples/OICMiddle/OICMiddle.h | 1 + | |||||
2 files changed, 9 insertions(+), 1 deletion(-) | |||||
--- a/examples/OICMiddle/OICMiddle.cpp | |||||
+++ b/examples/OICMiddle/OICMiddle.cpp | |||||
@@ -99,8 +99,15 @@ void Middle::startPlatform() | |||||
//std::string ipaddr = INADDR_ANY; | |||||
std::string ipaddr = "0.0.0.0"; | |||||
+ // Initialize Persistent Storage for SVR database | |||||
+ middle.ps.open = fopen; | |||||
+ middle.ps.read = fread; | |||||
+ middle.ps.write = fwrite; | |||||
+ middle.ps.close = fclose; | |||||
+ middle.ps.unlink = unlink; | |||||
+ | |||||
PlatformConfig cfg { ServiceType::InProc, ModeType::Both, | |||||
- ipaddr, port, QualityOfService::LowQos}; | |||||
+ ipaddr, port, QualityOfService::LowQos, &middle.ps}; | |||||
OC::OCPlatform::Configure(cfg); | |||||
} | |||||
--- a/examples/OICMiddle/OICMiddle.h | |||||
+++ b/examples/OICMiddle/OICMiddle.h | |||||
@@ -83,6 +83,7 @@ protected: | |||||
MiddleServer *m_server; | |||||
LineInput *m_lineInput; | |||||
RestInput *m_restInput; | |||||
+ OCPersistentStorage ps; | |||||
protected: | |||||
void startPlatform(); |