Separate MOT-disabled/enabled SVR DB files for enrollee 97/15597/3
authorJihun Ha <jihun.ha@samsung.com>
Tue, 13 Dec 2016 05:20:54 +0000 (14:20 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 19 Dec 2016 10:17:06 +0000 (10:17 +0000)
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 <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15547
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit cee9ccbb44d8cff3dd17fdf01a519209d4ad131c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15597
Reviewed-by: Heewon Park <h_w.park@samsung.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
service/easy-setup/sampleapp/enrollee/linux/SConscript
service/easy-setup/sampleapp/enrollee/linux/enrolleewifi.c
service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server.dat
service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat [new file with mode: 0644]

index 8918906..e647c22 100644 (file)
@@ -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')
index 555deba..2f0c6f2 100755 (executable)
@@ -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;
 
index ae81a11..135d7b3 100644 (file)
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 (file)
index 0000000..ae81a11
Binary files /dev/null and b/service/easy-setup/sampleapp/enrollee/linux/oic_svr_db_server_MOT.dat differ