From 53bfc0f9f3a4bb37992b0f8f2c61f8844d679c4f Mon Sep 17 00:00:00 2001 From: Ziran Sun Date: Wed, 1 Jun 2016 10:25:26 +0100 Subject: [PATCH] Retrieve on /oic/res?rt=oic.d.xxx should return as per oic.if.ll rather than returning as per oic.if.baseline. This change set the default interface of /oic/res as oic.if.ll when no interface is specified in the enquiry. JIRA issue: https://jira.iotivity.org/browse/IOT-1103 Change-Id: I7694be578aec57b640ba6fdc84c4fec472fe92f5 Signed-off-by: Ziran Sun Reviewed-on: https://gerrit.iotivity.org/gerrit/8415 Tested-by: jenkins-iotivity Reviewed-by: Mushfiqul Islam --- resource/csdk/stack/src/ocresource.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index ea051a4..5349740 100755 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -752,13 +752,6 @@ static OCStackResult HandleVirtualResource (OCServerRequest *request, OCResource for (; resource && discoveryResult == OC_STACK_OK; resource = resource->next) { bool result = false; - if (resource->resourceProperties & OC_EXPLICIT_DISCOVERABLE) - { - if (resourceTypeQuery && resourceMatchesRTFilter(resource, resourceTypeQuery)) - { - result = true; - } - } if (resource->resourceProperties & OC_DISCOVERABLE) { result = true; @@ -773,8 +766,7 @@ static OCStackResult HandleVirtualResource (OCServerRequest *request, OCResource } else { - if ((interfaceQuery && (0 != strcmp(interfaceQuery, OC_RSRVD_INTERFACE_LL))) || - !interfaceQuery) + if (interfaceQuery && (0 != strcmp(interfaceQuery, OC_RSRVD_INTERFACE_LL))) { discPayload->uri = OICStrdup(OC_RSRVD_WELL_KNOWN_URI); VERIFY_NON_NULL(discPayload->uri, ERROR, OC_STACK_NO_MEMORY); -- 2.7.4