summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryoungman <yman.jung@samsung.com>2016-11-01 17:47:06 +0900
committeryoungman <yman.jung@samsung.com>2016-11-03 16:30:30 +0900
commitab7e1c81a506451c0d7b4fa4e27e9a3c681444db (patch)
tree10b62f65dd433856b8e34252f04c0b86967f5a1a
parentc1a1158b94781580cfbf68dab78451ac0458485d (diff)
downloadiotcon-ab7e1c81a506451c0d7b4fa4e27e9a3c681444db.tar.gz
iotcon-ab7e1c81a506451c0d7b4fa4e27e9a3c681444db.tar.bz2
iotcon-ab7e1c81a506451c0d7b4fa4e27e9a3c681444db.zip
change skeleton svr-db for iotivity 1.2.0
Change-Id: I0a59f1c89c58d1295d52e8a5f9f9be1b31408844 Signed-off-by: youngman <yman.jung@samsung.com>
-rw-r--r--src/ic-cbor.c56
-rw-r--r--src/ic-ioty-parse.c2
-rw-r--r--src/ic-remote-resource-caching.c1
-rw-r--r--test/iotcon-test-svr-db-client.datbin2927 -> 2477 bytes
-rw-r--r--test/iotcon-test-svr-db-server.datbin3585 -> 2733 bytes
5 files changed, 13 insertions, 46 deletions
diff --git a/src/ic-cbor.c b/src/ic-cbor.c
index e5131af..109b166 100644
--- a/src/ic-cbor.c
+++ b/src/ic-cbor.c
@@ -34,8 +34,8 @@ int icl_cbor_create_svr_db(const char *path)
int fd;
int ret;
const uint8_t cbor_binary[] = {
- 0xBF, 0x63, 0x61, 0x63, 0x6C, 0x59, 0x03, 0x4F, 0xA4, 0x66, 0x61, 0x63,
- 0x6C, 0x69, 0x73, 0x74, 0xA1, 0x64, 0x61, 0x63, 0x65, 0x73, 0x84, 0xA3,
+ 0xBF, 0x63, 0x61, 0x63, 0x6C, 0x59, 0x02, 0x47, 0xA4, 0x66, 0x61, 0x63,
+ 0x6C, 0x69, 0x73, 0x74, 0xA1, 0x64, 0x61, 0x63, 0x65, 0x73, 0x82, 0xA3,
0x6B, 0x73, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x75, 0x75, 0x69, 0x64,
0x61, 0x2A, 0x69, 0x72, 0x65, 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x73,
0x83, 0xA4, 0x64, 0x68, 0x72, 0x65, 0x66, 0x68, 0x2F, 0x6F, 0x69, 0x63,
@@ -76,29 +76,7 @@ int icl_cbor_create_svr_db(const char *path)
0x72, 0x65, 0x64, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E,
0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x63,
0x72, 0x65, 0x6C, 0x60, 0x6A, 0x70, 0x65, 0x72, 0x6D, 0x69, 0x73, 0x73,
- 0x69, 0x6F, 0x6E, 0x06, 0xA3, 0x6B, 0x73, 0x75, 0x62, 0x6A, 0x65, 0x63,
- 0x74, 0x75, 0x75, 0x69, 0x64, 0x61, 0x2A, 0x69, 0x72, 0x65, 0x73, 0x6F,
- 0x75, 0x72, 0x63, 0x65, 0x73, 0x82, 0xA4, 0x64, 0x68, 0x72, 0x65, 0x66,
- 0x6E, 0x2F, 0x6F, 0x69, 0x63, 0x2F, 0x73, 0x65, 0x63, 0x2F, 0x70, 0x63,
- 0x6F, 0x6E, 0x66, 0x62, 0x72, 0x74, 0x81, 0x6B, 0x6F, 0x69, 0x63, 0x2E,
- 0x72, 0x2E, 0x70, 0x63, 0x6F, 0x6E, 0x66, 0x62, 0x69, 0x66, 0x81, 0x6F,
- 0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C,
- 0x69, 0x6E, 0x65, 0x63, 0x72, 0x65, 0x6C, 0x60, 0xA4, 0x64, 0x68, 0x72,
- 0x65, 0x66, 0x71, 0x2F, 0x6F, 0x69, 0x63, 0x2F, 0x73, 0x65, 0x63, 0x2F,
- 0x64, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6E, 0x67, 0x62, 0x72, 0x74, 0x81,
- 0x6E, 0x6F, 0x69, 0x63, 0x2E, 0x72, 0x2E, 0x64, 0x70, 0x61, 0x69, 0x72,
- 0x69, 0x6E, 0x67, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E,
- 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x63,
- 0x72, 0x65, 0x6C, 0x60, 0x6A, 0x70, 0x65, 0x72, 0x6D, 0x69, 0x73, 0x73,
- 0x69, 0x6F, 0x6E, 0x06, 0xA3, 0x6B, 0x73, 0x75, 0x62, 0x6A, 0x65, 0x63,
- 0x74, 0x75, 0x75, 0x69, 0x64, 0x61, 0x2A, 0x69, 0x72, 0x65, 0x73, 0x6F,
- 0x75, 0x72, 0x63, 0x65, 0x73, 0x81, 0xA4, 0x64, 0x68, 0x72, 0x65, 0x66,
- 0x6C, 0x2F, 0x6F, 0x69, 0x63, 0x2F, 0x73, 0x65, 0x63, 0x2F, 0x76, 0x65,
- 0x72, 0x62, 0x72, 0x74, 0x81, 0x69, 0x6F, 0x69, 0x63, 0x2E, 0x72, 0x2E,
- 0x76, 0x65, 0x72, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E,
- 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x63,
- 0x72, 0x65, 0x6C, 0x60, 0x6A, 0x70, 0x65, 0x72, 0x6D, 0x69, 0x73, 0x73,
- 0x69, 0x6F, 0x6E, 0x02, 0x6A, 0x72, 0x6F, 0x77, 0x6E, 0x65, 0x72, 0x75,
+ 0x69, 0x6F, 0x6E, 0x06, 0x6A, 0x72, 0x6F, 0x77, 0x6E, 0x65, 0x72, 0x75,
0x75, 0x69, 0x64, 0x78, 0x24, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D,
0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
@@ -107,7 +85,7 @@ int icl_cbor_create_svr_db(const char *path)
0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C,
0x69, 0x6E, 0x65, 0x65, 0x70, 0x73, 0x74, 0x61, 0x74, 0x58, 0x9D, 0xA9,
0x64, 0x69, 0x73, 0x6F, 0x70, 0xF4, 0x62, 0x63, 0x6D, 0x02, 0x62, 0x74,
- 0x6D, 0x00, 0x62, 0x6F, 0x6D, 0x03, 0x62, 0x73, 0x6D, 0x03, 0x6A, 0x64,
+ 0x6D, 0x00, 0x62, 0x6F, 0x6D, 0x04, 0x62, 0x73, 0x6D, 0x04, 0x6A, 0x64,
0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64, 0x78, 0x24, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30,
0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30,
@@ -119,7 +97,7 @@ int icl_cbor_create_svr_db(const char *path)
0x62, 0x72, 0x74, 0x81, 0x6B, 0x6F, 0x69, 0x63, 0x2E, 0x72, 0x2E, 0x70,
0x73, 0x74, 0x61, 0x74, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69, 0x63,
0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E, 0x65,
- 0x64, 0x64, 0x6F, 0x78, 0x6D, 0x58, 0xE8, 0xAA, 0x64, 0x6F, 0x78, 0x6D,
+ 0x64, 0x64, 0x6F, 0x78, 0x6D, 0x58, 0xE9, 0xBF, 0x64, 0x6F, 0x78, 0x6D,
0x73, 0x81, 0x00, 0x66, 0x6F, 0x78, 0x6D, 0x73, 0x65, 0x6C, 0x00, 0x63,
0x73, 0x63, 0x74, 0x01, 0x65, 0x6F, 0x77, 0x6E, 0x65, 0x64, 0xF4, 0x6A,
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64, 0x78, 0x24,
@@ -166,10 +144,10 @@ int icl_cbor_create_pt_svr_db(const char *path)
int ret;
uint8_t uuid[ICL_CBOR_UUID_SIZE];
char uuid_str[ICL_CBOR_UUID_STR_LEN + 1];
- const int uuid_points[] = {571, 685, 734, 854, 905, 954};
+ const int uuid_points[] = {403, 517, 566, 686, 737, 786};
static uint8_t cbor_binary[] = {
- 0xBF, 0x63, 0x61, 0x63, 0x6C, 0x59, 0x02, 0x79, 0xA4, 0x66, 0x61, 0x63,
- 0x6C, 0x69, 0x73, 0x74, 0xA1, 0x64, 0x61, 0x63, 0x65, 0x73, 0x83, 0xA3,
+ 0xBF, 0x63, 0x61, 0x63, 0x6C, 0x59, 0x01, 0xD1, 0xA4, 0x66, 0x61, 0x63,
+ 0x6C, 0x69, 0x73, 0x74, 0xA1, 0x64, 0x61, 0x63, 0x65, 0x73, 0x82, 0xA3,
0x6B, 0x73, 0x75, 0x62, 0x6A, 0x65, 0x63, 0x74, 0x75, 0x75, 0x69, 0x64,
0x61, 0x2A, 0x69, 0x72, 0x65, 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x73,
0x83, 0xA4, 0x64, 0x68, 0x72, 0x65, 0x66, 0x68, 0x2F, 0x6F, 0x69, 0x63,
@@ -200,20 +178,6 @@ int icl_cbor_create_pt_svr_db(const char *path)
0x70, 0x73, 0x74, 0x61, 0x74, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69,
0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E,
0x65, 0x63, 0x72, 0x65, 0x6C, 0x60, 0x6A, 0x70, 0x65, 0x72, 0x6D, 0x69,
- 0x73, 0x73, 0x69, 0x6F, 0x6E, 0x02, 0xA3, 0x6B, 0x73, 0x75, 0x62, 0x6A,
- 0x65, 0x63, 0x74, 0x75, 0x75, 0x69, 0x64, 0x61, 0x2A, 0x69, 0x72, 0x65,
- 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x73, 0x82, 0xA4, 0x64, 0x68, 0x72,
- 0x65, 0x66, 0x6E, 0x2F, 0x6F, 0x69, 0x63, 0x2F, 0x73, 0x65, 0x63, 0x2F,
- 0x70, 0x63, 0x6F, 0x6E, 0x66, 0x62, 0x72, 0x74, 0x81, 0x6B, 0x6F, 0x69,
- 0x63, 0x2E, 0x72, 0x2E, 0x70, 0x63, 0x6F, 0x6E, 0x66, 0x62, 0x69, 0x66,
- 0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73,
- 0x65, 0x6C, 0x69, 0x6E, 0x65, 0x63, 0x72, 0x65, 0x6C, 0x60, 0xA4, 0x64,
- 0x68, 0x72, 0x65, 0x66, 0x71, 0x2F, 0x6F, 0x69, 0x63, 0x2F, 0x73, 0x65,
- 0x63, 0x2F, 0x64, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6E, 0x67, 0x62, 0x72,
- 0x74, 0x81, 0x6E, 0x6F, 0x69, 0x63, 0x2E, 0x72, 0x2E, 0x64, 0x70, 0x61,
- 0x69, 0x72, 0x69, 0x6E, 0x67, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F, 0x69,
- 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69, 0x6E,
- 0x65, 0x63, 0x72, 0x65, 0x6C, 0x60, 0x6A, 0x70, 0x65, 0x72, 0x6D, 0x69,
0x73, 0x73, 0x69, 0x6F, 0x6E, 0x02, 0x6A, 0x72, 0x6F, 0x77, 0x6E, 0x65,
0x72, 0x75, 0x75, 0x69, 0x64, 0x78, 0x24, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30,
@@ -223,7 +187,7 @@ int icl_cbor_create_pt_svr_db(const char *path)
0x81, 0x6F, 0x6F, 0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73,
0x65, 0x6C, 0x69, 0x6E, 0x65, 0x65, 0x70, 0x73, 0x74, 0x61, 0x74, 0x58,
0x9D, 0xA9, 0x64, 0x69, 0x73, 0x6F, 0x70, 0xF5, 0x62, 0x63, 0x6D, 0x00,
- 0x62, 0x74, 0x6D, 0x00, 0x62, 0x6F, 0x6D, 0x03, 0x62, 0x73, 0x6D, 0x03,
+ 0x62, 0x74, 0x6D, 0x00, 0x62, 0x6F, 0x6D, 0x04, 0x62, 0x73, 0x6D, 0x04,
0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64, 0x78,
0x24, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30,
0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30, 0x2D, 0x30, 0x30, 0x30, 0x30,
@@ -235,7 +199,7 @@ int icl_cbor_create_pt_svr_db(const char *path)
0x30, 0x30, 0x62, 0x72, 0x74, 0x81, 0x6B, 0x6F, 0x69, 0x63, 0x2E, 0x72,
0x2E, 0x70, 0x73, 0x74, 0x61, 0x74, 0x62, 0x69, 0x66, 0x81, 0x6F, 0x6F,
0x69, 0x63, 0x2E, 0x69, 0x66, 0x2E, 0x62, 0x61, 0x73, 0x65, 0x6C, 0x69,
- 0x6E, 0x65, 0x64, 0x64, 0x6F, 0x78, 0x6D, 0x58, 0xE8, 0xAA, 0x64, 0x6F,
+ 0x6E, 0x65, 0x64, 0x64, 0x6F, 0x78, 0x6D, 0x58, 0xE9, 0xBF, 0x64, 0x6F,
0x78, 0x6D, 0x73, 0x81, 0x00, 0x66, 0x6F, 0x78, 0x6D, 0x73, 0x65, 0x6C,
0x00, 0x63, 0x73, 0x63, 0x74, 0x01, 0x65, 0x6F, 0x77, 0x6E, 0x65, 0x64,
0xF5, 0x6A, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x75, 0x75, 0x69, 0x64,
diff --git a/src/ic-ioty-parse.c b/src/ic-ioty-parse.c
index 94cd59d..fc42ae0 100644
--- a/src/ic-ioty-parse.c
+++ b/src/ic-ioty-parse.c
@@ -226,6 +226,8 @@ void ic_ioty_free_resource_list(gpointer data)
{
iotcon_remote_resource_h resource = data;
+ resource->is_found = false;
+
iotcon_remote_resource_destroy(resource);
}
diff --git a/src/ic-remote-resource-caching.c b/src/ic-remote-resource-caching.c
index 5832d04..d54727f 100644
--- a/src/ic-remote-resource-caching.c
+++ b/src/ic-remote-resource-caching.c
@@ -47,6 +47,7 @@ API int iotcon_remote_resource_start_caching(iotcon_remote_resource_h resource,
INFO("Start Caching");
+ icl_remote_resource_ref(resource);
ret = icl_ioty_remote_resource_start_caching(resource, cb, user_data);
if (IOTCON_ERROR_NONE != ret) {
ERR("icl_ioty_remote_resource_start_caching() Fail(%d)", ret);
diff --git a/test/iotcon-test-svr-db-client.dat b/test/iotcon-test-svr-db-client.dat
index 0abd136..9d1379a 100644
--- a/test/iotcon-test-svr-db-client.dat
+++ b/test/iotcon-test-svr-db-client.dat
Binary files differ
diff --git a/test/iotcon-test-svr-db-server.dat b/test/iotcon-test-svr-db-server.dat
index 2f5922b..d508b68 100644
--- a/test/iotcon-test-svr-db-server.dat
+++ b/test/iotcon-test-svr-db-server.dat
Binary files differ