aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumar G S <senthil.gs@samsung.com>2017-11-22 22:55:16 +0530
committerUze Choi <uzchoi@samsung.com>2017-11-23 08:15:44 +0000
commitd698f81a3ff115d6f31021bbe5fc2c9a325373e8 (patch)
treeab72dc6dc72ef9cce2f470b5eb0071307d78cf4b
parentfb2e25fcdb8b06d876b908830d1afe26f63f9e72 (diff)
[IOT-2906][ES] Remove "href" from child response.1.3.1-RC6
For requests which come directly to child resources (/WiFiConfResURI, /CoapCloudConfResURI and /DevConfResURI), this patch will remove the "href" property from the response as spec doesn't mandate the addition of "href" in the response. And also, CTT expects the response from direct request to any child to be same as the response which comes for the same child through collection. For example: Properties in "rep" for '/WiFiConfResURI' should be same as the properties in the direct response for GET from '/WiFiConfResURI' resource. Currently "href" is not included in "rep" for child resources. But it is included in the direct response for GET/POST. When CTT compares both responses, it finds them different due of "href". This patch resolves the issue and still conforms to spec. Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c0 Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
-rw-r--r--service/easy-setup/enrollee/src/easysetup.c2
-rw-r--r--service/easy-setup/enrollee/src/resourcehandler.c9
2 files changed, 7 insertions, 4 deletions
diff --git a/service/easy-setup/enrollee/src/easysetup.c b/service/easy-setup/enrollee/src/easysetup.c
index 0bf3d73..5d88a13 100644
--- a/service/easy-setup/enrollee/src/easysetup.c
+++ b/service/easy-setup/enrollee/src/easysetup.c
@@ -281,7 +281,7 @@ ESResult ESTerminateEnrollee()
return ES_ERROR;
}
- OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESTerminateEnrollee success");
+ OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESTerminateEnrollee success");
return ES_OK;
}
diff --git a/service/easy-setup/enrollee/src/resourcehandler.c b/service/easy-setup/enrollee/src/resourcehandler.c
index cab9ac4..cad86ce 100644
--- a/service/easy-setup/enrollee/src/resourcehandler.c
+++ b/service/easy-setup/enrollee/src/resourcehandler.c
@@ -854,12 +854,13 @@ OCRepPayload* constructResponseOfWiFiConf(char *interface, ES_BATCH_UPDATE_RESPO
}
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse WiFiConf res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFICONF);
OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{
+ OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFICONF);
+
repPayload = OCRepPayloadCreate();
if (!repPayload)
{
@@ -991,12 +992,13 @@ OCRepPayload* constructResponseOfCoapCloudConf(char *interface, ES_BATCH_UPDATE_
}
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse CoapCloudConf res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_COAPCLOUDCONF);
OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{
+ OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_COAPCLOUDCONF);
+
repPayload = OCRepPayloadCreate();
if (!repPayload)
{
@@ -1087,12 +1089,13 @@ OCRepPayload* constructResponseOfDevConf(char *interface, ES_BATCH_UPDATE_RESPON
}
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse DevConf res");
- OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{
+ OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
+
repPayload = OCRepPayloadCreate();
if (!repPayload)
{