From: coderhyme Date: Mon, 3 Aug 2015 17:03:36 +0000 (+0900) Subject: Fix a bug of discoverResource of RCSDiscoveryManager X-Git-Tag: 1.2.0+RC1~1273 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df620b12936d8eeccac34cc8ca477de58e7beb09;p=platform%2Fupstream%2Fiotivity.git 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 --- 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");