RD Query Response
authorHabib Virji <habib.virji@samsung.com>
Sat, 5 Sep 2015 22:55:17 +0000 (23:55 +0100)
committerMadan Lanka <lanka.madan@samsung.com>
Mon, 21 Sep 2015 08:49:45 +0000 (08:49 +0000)
RD Query response correction.

Also includes small minor clean up.

Change-Id: I279f91942d2806f20e0b17dab7f32477bba30849
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2386
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Madan Lanka <lanka.madan@samsung.com>
service/resource-directory/samples/rd_publishingClient.cpp
service/resource-directory/samples/rd_queryClient.cpp
service/resource-directory/src/internal/rd_storage.c

index bc6e2d1..444ceac 100644 (file)
@@ -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;
index 4a24c9f..caecfd9 100644 (file)
@@ -17,8 +17,6 @@
 // limitations under the License.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include <vector>
-
 #include "OCApi.h"
 #include "OCPlatform.h"
 
index 878cc36..9c7c77c 100644 (file)
@@ -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;
 }