From: Jihun Ha Date: Tue, 13 Dec 2016 05:20:54 +0000 (+0900) Subject: Separate MOT-disabled/enabled SVR DB files for enrollee X-Git-Tag: 1.3.0~993 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6099bf3be1e3dc9af7315c6f8635b751b5840e6b;p=platform%2Fupstream%2Fiotivity.git Separate MOT-disabled/enabled SVR DB files for enrollee MOT-disabled Enrollee should not have "PRECONFIG_PIN(0xFF00)" method in oxms property, e.g. "oxms" : [0, 65280]. If SVR db file include the value and Mediator can not know the value, Ownership transfer will be failed because mediator presume that enrollee can support unknown method for ownership transfer. Change-Id: I8b50677215105244ad351dc1791c88a34a7cff77 Signed-off-by: Jihun Ha Reviewed-on: https://gerrit.iotivity.org/gerrit/15547 Tested-by: jenkins-iotivity Reviewed-by: Uze Choi (cherry picked from commit cee9ccbb44d8cff3dd17fdf01a519209d4ad131c) Reviewed-on: https://gerrit.iotivity.org/gerrit/15597 Reviewed-by: Heewon Park Reviewed-by: Phil Coval --- diff --git a/service/easy-setup/sampleapp/enrollee/linux/SConscript b/service/easy-setup/sampleapp/enrollee/linux/SConscript index 8918906..e647c22 100644 --- a/service/easy-setup/sampleapp/enrollee/linux/SConscript +++ b/service/easy-setup/sampleapp/enrollee/linux/SConscript @@ -68,5 +68,9 @@ i_enrollee = enrollee_env.Install(env.get('BUILD_DIR'), enrollee) justworksdat = enrollee_env.Install(env.get('BUILD_DIR') + '/service/easy-setup/sampleapp/enrollee/linux/', env.get('SRC_DIR') + '/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat') -Alias('enrollee', [i_enrollee, justworksdat]) +MOTdat = enrollee_env.Install(env.get('BUILD_DIR') + '/service/easy-setup/sampleapp/enrollee/linux/', + env.get('SRC_DIR') + '/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat') + + +Alias('enrollee', [i_enrollee, justworksdat, MOTdat]) env.AppendTarget('enrollee') diff --git a/service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c b/service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c index 555deba..2f0c6f2 100755 --- a/service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c +++ b/service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c @@ -39,7 +39,11 @@ pthread_t thread_handle = NULL; * It contains Server's Identity and the PSK credentials * of other devices which the server trusts */ +#ifdef MULTIPLE_OWNER +static char CRED_FILE[] = "oic_svr_db_server_MOT.dat"; +#else static char CRED_FILE[] = "oic_svr_db_server.dat"; +#endif OCPersistentStorage ps; diff --git a/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat b/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat index ae81a11..135d7b3 100644 Binary files a/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat and b/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat differ diff --git a/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat b/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat new file mode 100644 index 0000000..ae81a11 Binary files /dev/null and b/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat differ