From a571708e1ae49c7b8f4d2470bff85266b14e8562 Mon Sep 17 00:00:00 2001 From: Habib Virji Date: Sat, 5 Sep 2015 23:55:17 +0100 Subject: [PATCH] RD Query Response RD Query response correction. Also includes small minor clean up. Change-Id: I279f91942d2806f20e0b17dab7f32477bba30849 Signed-off-by: Habib Virji Reviewed-on: https://gerrit.iotivity.org/gerrit/2386 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- service/resource-directory/samples/rd_publishingClient.cpp | 2 +- service/resource-directory/samples/rd_queryClient.cpp | 2 -- service/resource-directory/src/internal/rd_storage.c | 10 +++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/service/resource-directory/samples/rd_publishingClient.cpp b/service/resource-directory/samples/rd_publishingClient.cpp index bc6e2d1..444ceac 100644 --- a/service/resource-directory/samples/rd_publishingClient.cpp +++ b/service/resource-directory/samples/rd_publishingClient.cpp @@ -89,7 +89,7 @@ int biasFactorCB(char addr[MAX_ADDR_STR_SIZE], uint16_t port) return 0; } -int main(int argc , char *argv[]) +int main() { int in; PlatformConfig cfg; diff --git a/service/resource-directory/samples/rd_queryClient.cpp b/service/resource-directory/samples/rd_queryClient.cpp index 4a24c9f..caecfd9 100644 --- a/service/resource-directory/samples/rd_queryClient.cpp +++ b/service/resource-directory/samples/rd_queryClient.cpp @@ -17,8 +17,6 @@ // limitations under the License. // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#include - #include "OCApi.h" #include "OCPlatform.h" diff --git a/service/resource-directory/src/internal/rd_storage.c b/service/resource-directory/src/internal/rd_storage.c index 878cc36..9c7c77c 100644 --- a/service/resource-directory/src/internal/rd_storage.c +++ b/service/resource-directory/src/internal/rd_storage.c @@ -133,14 +133,14 @@ OCStackResult OCRDCheckPublishedResource(const char *interfaceType, const char * if (!*uri) { OC_LOG_V(ERROR, TAG, "Copy failed.."); - return false; + return OC_STACK_ERROR; } *rt = OICStrdup(tLinks->rt); if (!*rt) { OC_LOG_V(ERROR, TAG, "Copy failed.."); OICFree(*uri); - return false; + return OC_STACK_ERROR; } *itf = OICStrdup(tLinks->itf); if (!*itf) @@ -148,12 +148,12 @@ OCStackResult OCRDCheckPublishedResource(const char *interfaceType, const char * OC_LOG_V(ERROR, TAG, "Copy failed.."); OICFree(*uri); OICFree(*rt); - return false; + return OC_STACK_ERROR; } - return true; + return OC_STACK_OK; } } } - return false; + return OC_STACK_ERROR; } -- 2.7.4