Updated discovery response when filter query does not match.
Iotivity should respond to discovery requests in below manner:
If query filter matching fails (or if Server does not have
any DISCOVERABLE resources) and discovery request is multicast,
it should NOT send any response.
But, if the discovery request is unicast in above scenario,
it should send an error(RESOURCE_NOT_FOUND - 404) response with
empty payload.
Currently, Iotivity stack sends a response in all error scenarios
with return code as OC_EH_OK (along with some payload) which has
various drawbacks, such as, causes un-necessary traffic in the network
and also wastes power on constrained devices.
Change-Id: Ibb3bedc7b8ae67b708b89e9ad747c031ab552cae
Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1766
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>