Commit d698f81a authored by Senthil Kumar G S's avatar Senthil Kumar G S Committed by Uze Choi

[IOT-2906][ES] Remove "href" from child response.

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: default avatarSenthil Kumar G S <senthil.gs@samsung.com>
parent fb2e25fc
...@@ -281,7 +281,7 @@ ESResult ESTerminateEnrollee() ...@@ -281,7 +281,7 @@ ESResult ESTerminateEnrollee()
return ES_ERROR; return ES_ERROR;
} }
OIC_LOG(ERROR, ES_ENROLLEE_TAG, "ESTerminateEnrollee success"); OIC_LOG(INFO, ES_ENROLLEE_TAG, "ESTerminateEnrollee success");
return ES_OK; return ES_OK;
} }
......
...@@ -854,12 +854,13 @@ OCRepPayload* constructResponseOfWiFiConf(char *interface, ES_BATCH_UPDATE_RESPO ...@@ -854,12 +854,13 @@ OCRepPayload* constructResponseOfWiFiConf(char *interface, ES_BATCH_UPDATE_RESPO
} }
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse WiFiConf res"); OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse WiFiConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFICONF);
OCRepPayload* repPayload = NULL; OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL; OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH)) if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{ {
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_WIFICONF);
repPayload = OCRepPayloadCreate(); repPayload = OCRepPayloadCreate();
if (!repPayload) if (!repPayload)
{ {
...@@ -991,12 +992,13 @@ OCRepPayload* constructResponseOfCoapCloudConf(char *interface, ES_BATCH_UPDATE_ ...@@ -991,12 +992,13 @@ OCRepPayload* constructResponseOfCoapCloudConf(char *interface, ES_BATCH_UPDATE_
} }
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse CoapCloudConf res"); OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse CoapCloudConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_COAPCLOUDCONF);
OCRepPayload* repPayload = NULL; OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL; OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH)) if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{ {
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_COAPCLOUDCONF);
repPayload = OCRepPayloadCreate(); repPayload = OCRepPayloadCreate();
if (!repPayload) if (!repPayload)
{ {
...@@ -1087,12 +1089,13 @@ OCRepPayload* constructResponseOfDevConf(char *interface, ES_BATCH_UPDATE_RESPON ...@@ -1087,12 +1089,13 @@ OCRepPayload* constructResponseOfDevConf(char *interface, ES_BATCH_UPDATE_RESPON
} }
OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse DevConf res"); OIC_LOG(DEBUG, ES_RH_TAG, "constructResponse DevConf res");
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
OCRepPayload* repPayload = NULL; OCRepPayload* repPayload = NULL;
OCRepPayload* tempPayload = NULL; OCRepPayload* tempPayload = NULL;
if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH)) if (!strcmp(interface, OC_RSRVD_INTERFACE_BATCH))
{ {
OCRepPayloadSetUri(payload, OC_RSRVD_ES_URI_DEVCONF);
repPayload = OCRepPayloadCreate(); repPayload = OCRepPayloadCreate();
if (!repPayload) if (!repPayload)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment