#include <pthread.h>
#endif
#include <array>
+#include "oic_malloc.h"
#include <getopt.h>
#include "ocstack.h"
#include "logger.h"
const char *version = "myVersion";
const char *systemTime = "2015-05-15T11.04";
const char *specVersion = "myDeviceSpecVersion";
-const char* dataModleVersion = "myDeviceModleVersion";
+const char *dataModelVersions = "myDeviceModelVersions";
// Entity handler should check for resourceTypeName and ResourceInterface in order to GET
// the existence of a known resource
{
free (deviceInfo.deviceName);
free (deviceInfo.specVersion);
- free (deviceInfo.dataModleVersion);
+ OCFreeOCStringLL (deviceInfo.dataModelVersions);
}
bool DuplicateString(char** targetString, const char* sourceString)
return OC_STACK_ERROR;
}
-OCStackResult SetDeviceInfo(const char* deviceName, const char* specVersion, const char* dataModleVersion)
+OCStackResult SetDeviceInfo(const char* deviceName, const char* specVersion, const char* dataModelVersions)
{
if(!DuplicateString(&deviceInfo.deviceName, deviceName))
{
{
return OC_STACK_ERROR;
}
- if(!DuplicateString(&deviceInfo.dataModleVersion, dataModleVersion))
+ OCFreeOCStringLL(deviceInfo.dataModelVersions);
+ deviceInfo.dataModelVersions = OCCreateOCStringLL(dataModelVersions);
+ if (!deviceInfo.dataModelVersions)
{
return OC_STACK_ERROR;
}
exit (EXIT_FAILURE);
}
- registrationResult = SetDeviceInfo(deviceName, specVersion, dataModleVersion);
+ registrationResult = SetDeviceInfo(deviceName, specVersion, dataModelVersions);
if (registrationResult != OC_STACK_OK)
{