From: vimala.v Date: Wed, 4 Nov 2015 10:56:17 +0000 (+0530) Subject: Optimization for EDR and LE adapter X-Git-Tag: 1.2.0+RC1~822 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea0e50a2ad0cf7a9cb35435085044cf763266685;p=platform%2Fupstream%2Fiotivity.git Optimization for EDR and LE adapter In EDR and LE adapter, a request can't be differentiated as unicast or multicast. Hence when a multicast request was received in EDR or LE adapter, a error response was sent which could have been ignored. Especially in Hetrogenous network, we received many responses with payload NULL for a multicast request. Hence as an optimization, we are blocking the error response for EDR and LE adapters. Change-Id: Ie3766115e8b89e21c760ec8232ebd74d73fc39c0 Signed-off-by: vimala.v Reviewed-on: https://gerrit.iotivity.org/gerrit/4029 Tested-by: jenkins-iotivity Reviewed-by: Abhishek Sharma Reviewed-by: Jon A. Cruz --- diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index 20cfd72..2c67858 100644 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -734,7 +734,8 @@ static OCStackResult HandleVirtualResource (OCServerRequest *request, OCResource { SendNonPersistantDiscoveryResponse(request, resource, payload, OC_EH_OK); } - else if(bMulticast == false) + else if(bMulticast == false && (request->devAddr.adapter != OC_ADAPTER_RFCOMM_BTEDR) && + (request->devAddr.adapter != OC_ADAPTER_GATT_BTLE)) { OC_LOG_V(ERROR, TAG, "Sending a (%d) error to (%d) \ discovery request", discoveryResult, virtualUriInRequest);