#endif
#include <ocstack.h>
#include <logger.h>
+#include "oic_string.h"
#define TAG ("occlient")
// 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,
/* 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;