replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / stack / test / linux / occlient.c
index 1180def..ecab7c7 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 #include <ocstack.h>
 #include <logger.h>
+#include "oic_string.h"
 
 #define TAG ("occlient")
 
@@ -46,6 +47,7 @@ void handleSigInt(int signum) {
 // This is a function called back when a device is discovered
 OCStackApplicationResult applicationDiscoverCB(
         OCClientResponse * clientResponse) {
+    (void)clientResponse;
     OIC_LOG(INFO, TAG, "Entering applicationDiscoverCB (Application Layer CB)");
     OIC_LOG_V(INFO, TAG, "Device =============> Discovered %s @ %s:%d",
                                     clientResponse->resourceUri,
@@ -66,8 +68,8 @@ int main() {
 
     /* Start a discovery query*/
     char szQueryUri[MAX_QUERY_LENGTH] = { 0 };
-    strcpy(szQueryUri, OC_MULTICAST_DISCOVERY_URI);
-    if (OCDoResource(NULL, OC_REST_GET, szQueryUri, 0, 0, 
+    OICStrcpy(szQueryUri, MAX_QUERY_LENGTH, OC_MULTICAST_DISCOVERY_URI);
+    if (OCDoResource(NULL, OC_REST_GET, szQueryUri, 0, 0,
             CT_DEFAULT, OC_LOW_QOS, 0, 0, 0) != OC_STACK_OK) {
         OIC_LOG(ERROR, TAG, "OCStack resource error");
         return 0;