From df620b12936d8eeccac34cc8ca477de58e7beb09 Mon Sep 17 00:00:00 2001 From: coderhyme Date: Tue, 4 Aug 2015 02:03:36 +0900 Subject: [PATCH] Fix a bug of discoverResource of RCSDiscoveryManager Discovery with an empty uri should be allowed. Change-Id: I38700ce30a24b56310966bc3265bf977f2b546d2 Signed-off-by: coderhyme Reviewed-on: https://gerrit.iotivity.org/gerrit/2084 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- service/resource-encapsulation/include/RCSDiscoveryManager.h | 2 +- .../src/resourceClient/RCSDiscoveryManager.cpp | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/service/resource-encapsulation/include/RCSDiscoveryManager.h b/service/resource-encapsulation/include/RCSDiscoveryManager.h index d73a7be..53ad2b1 100644 --- a/service/resource-encapsulation/include/RCSDiscoveryManager.h +++ b/service/resource-encapsulation/include/RCSDiscoveryManager.h @@ -69,7 +69,7 @@ namespace OIC * @param resourceURI The uri of resource to be searched * @param cb A callback to obtain discovered resource * - * @throws InvalidParameterException If any parameter is invalid. + * @throws InvalidParameterException If cb is empty. * * @note The callback will be invoked in an internal thread. * diff --git a/service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp b/service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp index ef38e12..c51b733 100644 --- a/service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp +++ b/service/resource-encapsulation/src/resourceClient/RCSDiscoveryManager.cpp @@ -61,12 +61,6 @@ namespace OIC { SCOPE_LOG_F(DEBUG, TAG); - if (resourceURI.empty()) - { - OC_LOG(ERROR, TAG, "discoverResource NULL resourceURI"); - throw InvalidParameterException{ "discoverResource NULL resourceURI'" }; - } - if (!cb) { OC_LOG(ERROR, TAG, "discoverResource NULL Callback"); -- 2.7.4