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 bc6e2d10acb50dda859d13a0eb766c56e32481d5..444ceacb7652ef41688a4dc3f9d4996c54a99419 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 4a24c9f0d6be7e18a405fe5848968aa1df86a0f9..caecfd971b8ab9d21a2fcffd366647f17ace87ff 100644 (file)
@@ -17,8 +17,6 @@
 // limitations under the License.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#include <vector>
-
 #include "OCApi.h"
 #include "OCPlatform.h"
 
index 878cc365174a6c5c284c0bc5bdbb97452e663d9c..9c7c77c778c225e738f656e448164481e95800ea 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;
 }