From 7d27c1850d700e01dcdf7ede71f4e2f75c8fea28 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Tue, 14 Jun 2016 17:10:37 +0200 Subject: [PATCH] Fix typo "Model" is correct spelling not "Modle" Maybe be squashed into : 5f505cf352f0f5fd675b3f97662b5f243dd2f89e https://gerrit.iotivity.org/gerrit/#/c/8325/ Bug: https://jira.iotivity.org/browse/IOT-1100 Change-Id: If13b0155b1d94ce2bb362ed4cf580b2879e84090 Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/8639 Tested-by: jenkins-iotivity Reviewed-by: David Antler Reviewed-by: Ziran Sun --- plugins/samples/linux/IotivityandZigbeeServer.c | 2 +- resource/csdk/stack/include/octypes.h | 2 +- .../stack/samples/linux/SimpleClientServer/ocserver.cpp | 10 +++++----- .../stack/samples/tizen/SimpleClientServer/ocserver.cpp | 10 +++++----- resource/csdk/stack/src/ocresource.c | 16 ++++++++-------- resource/examples/devicediscoveryserver.cpp | 12 ++++++------ resource/unittests/OCPlatformTest.cpp | 4 ++-- service/simulator/examples/client/simulator_client.cpp | 2 +- 8 files changed, 29 insertions(+), 29 deletions(-) diff --git a/plugins/samples/linux/IotivityandZigbeeServer.c b/plugins/samples/linux/IotivityandZigbeeServer.c index b978074..df8db7e 100644 --- a/plugins/samples/linux/IotivityandZigbeeServer.c +++ b/plugins/samples/linux/IotivityandZigbeeServer.c @@ -140,7 +140,7 @@ OCStackResult SetDeviceInfo() { .deviceName = "IoTivity/Zigbee Server Sample", .specVersion = "IoTivity/Zigbee Device Spec Version", - .dataModleVersion = "IoTivity/Zigbee Data Model Version", + .dataModelVersion = "IoTivity/Zigbee Data Model Version", }; char *dup = OICStrdup("oic.wk.d"); deviceInfo.types = (OCStringLL *)OICCalloc(1, sizeof(OCStringLL)); diff --git a/resource/csdk/stack/include/octypes.h b/resource/csdk/stack/include/octypes.h index a23cddc..3a79f4f 100644 --- a/resource/csdk/stack/include/octypes.h +++ b/resource/csdk/stack/include/octypes.h @@ -950,7 +950,7 @@ typedef struct /** Pointer to the device specification version.*/ char *specVersion; /** Pointer to the device data model version.*/ - char *dataModleVersion; + char *dataModelVersion; } OCDeviceInfo; #ifdef RA_ADAPTER diff --git a/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp b/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp index 22f6810..abf908d 100644 --- a/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp +++ b/resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp @@ -75,7 +75,7 @@ const char *supportUrl = "mySupportUrl"; const char *version = "myVersion"; const char *systemTime = "2015-05-15T11.04"; const char *specVersion = "myDeviceSpecVersion"; -const char* dataModleVersion = "myDeviceModleVersion"; +const char* dataModelVersion = "myDeviceModelVersion"; // Entity handler should check for resourceTypeName and ResourceInterface in order to GET // the existence of a known resource @@ -817,7 +817,7 @@ void DeleteDeviceInfo() { free (deviceInfo.deviceName); free (deviceInfo.specVersion); - free (deviceInfo.dataModleVersion); + free (deviceInfo.dataModelVersion); } bool DuplicateString(char** targetString, const char* sourceString) @@ -921,7 +921,7 @@ OCStackResult SetPlatformInfo(const char* platformID, const char *manufacturerNa 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* dataModelVersion) { if(!DuplicateString(&deviceInfo.deviceName, deviceName)) { @@ -931,7 +931,7 @@ OCStackResult SetDeviceInfo(const char* deviceName, const char* specVersion, con { return OC_STACK_ERROR; } - if(!DuplicateString(&deviceInfo.dataModleVersion, dataModleVersion)) + if(!DuplicateString(&deviceInfo.dataModelVersion, dataModelVersion)) { return OC_STACK_ERROR; } @@ -1055,7 +1055,7 @@ int main(int argc, char* argv[]) exit (EXIT_FAILURE); } - registrationResult = SetDeviceInfo(deviceName, specVersion, dataModleVersion); + registrationResult = SetDeviceInfo(deviceName, specVersion, dataModelVersion); if (registrationResult != OC_STACK_OK) { diff --git a/resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp b/resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp index 4195a6b..efac31e 100644 --- a/resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp +++ b/resource/csdk/stack/samples/tizen/SimpleClientServer/ocserver.cpp @@ -77,7 +77,7 @@ const char *supportUrl = "mySupportUrl"; const char *version = "myVersion"; const char *systemTime = "2015-05-15T11.04"; const char *specVersion = "myDeviceSpecVersion"; -const char* dataModleVersion = "myDeviceModleVersion"; +const char* dataModelVersion = "myDeviceModelVersion"; // Entity handler should check for resourceTypeName and ResourceInterface in order to GET // the existence of a known resource @@ -810,7 +810,7 @@ void DeleteDeviceInfo() { free (deviceInfo.deviceName); free (deviceInfo.specVersion); - free (deviceInfo.dataModleVersion); + free (deviceInfo.dataModelVersion); } bool DuplicateString(char** targetString, const char* sourceString) @@ -914,7 +914,7 @@ OCStackResult SetPlatformInfo(const char* platformID, const char *manufacturerNa 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* dataModelVersion) { if(!DuplicateString(&deviceInfo.deviceName, deviceName)) { @@ -924,7 +924,7 @@ OCStackResult SetDeviceInfo(const char* deviceName, const char* specVersion, con { return OC_STACK_ERROR; } - if(!DuplicateString(&deviceInfo.dataModleVersion, dataModleVersion)) + if(!DuplicateString(&deviceInfo.dataModelVersion, dataModelVersion)) { return OC_STACK_ERROR; } @@ -1029,7 +1029,7 @@ int main(int argc, char* argv[]) exit (EXIT_FAILURE); } - registrationResult = SetDeviceInfo(deviceName, specVersion, dataModleVersion); + registrationResult = SetDeviceInfo(deviceName, specVersion, dataModelVersion); if (registrationResult != OC_STACK_OK) { diff --git a/resource/csdk/stack/src/ocresource.c b/resource/csdk/stack/src/ocresource.c index ec74731..ea051a4 100755 --- a/resource/csdk/stack/src/ocresource.c +++ b/resource/csdk/stack/src/ocresource.c @@ -871,7 +871,7 @@ static OCStackResult HandleVirtualResource (OCServerRequest *request, OCResource else { payload = (OCPayload*) OCDevicePayloadCreate(deviceId, savedDeviceInfo.deviceName, - savedDeviceInfo.types, savedDeviceInfo.specVersion, savedDeviceInfo.dataModleVersion); + savedDeviceInfo.types, savedDeviceInfo.specVersion, savedDeviceInfo.dataModelVersion); if (!payload) { discoveryResult = OC_STACK_NO_MEMORY; @@ -1344,10 +1344,10 @@ void DeleteDeviceInfo() OICFree(savedDeviceInfo.deviceName); OCFreeOCStringLL(savedDeviceInfo.types); OICFree(savedDeviceInfo.specVersion); - OICFree(savedDeviceInfo.dataModleVersion); + OICFree(savedDeviceInfo.dataModelVersion); savedDeviceInfo.deviceName = NULL; savedDeviceInfo.specVersion = NULL; - savedDeviceInfo.dataModleVersion = NULL; + savedDeviceInfo.dataModelVersion = NULL; } static OCStackResult DeepCopyDeviceInfo(OCDeviceInfo info) @@ -1389,10 +1389,10 @@ static OCStackResult DeepCopyDeviceInfo(OCDeviceInfo info) } } - if (info.dataModleVersion) + if (info.dataModelVersion) { - savedDeviceInfo.dataModleVersion = OICStrdup(info.dataModleVersion); - if(!savedDeviceInfo.dataModleVersion && info.dataModleVersion) + savedDeviceInfo.dataModelVersion = OICStrdup(info.dataModelVersion); + if(!savedDeviceInfo.dataModelVersion && info.dataModelVersion) { DeleteDeviceInfo(); return OC_STACK_NO_MEMORY; @@ -1400,8 +1400,8 @@ static OCStackResult DeepCopyDeviceInfo(OCDeviceInfo info) } else { - savedDeviceInfo.dataModleVersion = OICStrdup(OC_DATA_MODEL_VERSION); - if(!savedDeviceInfo.dataModleVersion && OC_DATA_MODEL_VERSION) + savedDeviceInfo.dataModelVersion = OICStrdup(OC_DATA_MODEL_VERSION); + if(!savedDeviceInfo.dataModelVersion && OC_DATA_MODEL_VERSION) { DeleteDeviceInfo(); return OC_STACK_NO_MEMORY; diff --git a/resource/examples/devicediscoveryserver.cpp b/resource/examples/devicediscoveryserver.cpp index b81a15b..e97a8bf 100644 --- a/resource/examples/devicediscoveryserver.cpp +++ b/resource/examples/devicediscoveryserver.cpp @@ -49,7 +49,7 @@ std::string systemTime = "mySystemTime"; //Set of strings for each of device info fields std::string deviceName = "Bill's Battlestar"; std::string specVersion = "myDeviceSpecVersion"; -std::string dataModleVersion = "myDeviceModleVersion"; +std::string dataModelVersion = "myDeviceModelVersion"; //OCPlatformInfo Contains all the platform info to be stored OCPlatformInfo platformInfo; @@ -77,7 +77,7 @@ void DeleteDeviceInfo() { delete[] deviceInfo.deviceName; delete[] deviceInfo.specVersion; - delete[] deviceInfo.dataModleVersion; + delete[] deviceInfo.dataModelVersion; } void DuplicateString(char ** targetString, std::string sourceString) @@ -106,15 +106,15 @@ OCStackResult SetPlatformInfo(std::string platformID, std::string manufacturerNa } -OCStackResult SetDeviceInfo(std::string deviceName, std::string specVersion, std::string dataModleVersion) +OCStackResult SetDeviceInfo(std::string deviceName, std::string specVersion, std::string dataModelVersion) { DuplicateString(&deviceInfo.deviceName, deviceName); if (!specVersion.empty()) DuplicateString(&deviceInfo.specVersion, specVersion); - if (!dataModleVersion.empty()) - DuplicateString(&deviceInfo.dataModleVersion, dataModleVersion); + if (!dataModelVersion.empty()) + DuplicateString(&deviceInfo.dataModelVersion, dataModelVersion); return OC_STACK_OK; } @@ -148,7 +148,7 @@ int main() } - result = SetDeviceInfo(deviceName, specVersion, dataModleVersion); + result = SetDeviceInfo(deviceName, specVersion, dataModelVersion); OCResourcePayloadAddStringLL(&deviceInfo.types, "oic.wk.d"); OCResourcePayloadAddStringLL(&deviceInfo.types, "oic.d.tv"); diff --git a/resource/unittests/OCPlatformTest.cpp b/resource/unittests/OCPlatformTest.cpp index 93f62e4..9855686 100644 --- a/resource/unittests/OCPlatformTest.cpp +++ b/resource/unittests/OCPlatformTest.cpp @@ -88,7 +88,7 @@ namespace OCPlatformTest delete[] deviceInfo.deviceName; DeleteStringLL(deviceInfo.types); delete[] deviceInfo.specVersion; - delete[] deviceInfo.dataModleVersion; + delete[] deviceInfo.dataModelVersion; } void DuplicateString(char ** targetString, std::string sourceString) @@ -750,7 +750,7 @@ namespace OCPlatformTest OCResourcePayloadAddStringLL(&deviceInfo.types, "oic.wk.d"); OCResourcePayloadAddStringLL(&deviceInfo.types, "oic.d.tv"); DuplicateString(&deviceInfo.specVersion, "mySpecVersion"); - DuplicateString(&deviceInfo.dataModleVersion, "myDataModleVersion"); + DuplicateString(&deviceInfo.dataModelVersion, "myDataModelVersion"); EXPECT_EQ(OC_STACK_OK, OCPlatform::registerDeviceInfo(deviceInfo)); EXPECT_NO_THROW(DeleteDeviceInfo(deviceInfo)); } diff --git a/service/simulator/examples/client/simulator_client.cpp b/service/simulator/examples/client/simulator_client.cpp index a8f9f8f..229de74 100644 --- a/service/simulator/examples/client/simulator_client.cpp +++ b/service/simulator/examples/client/simulator_client.cpp @@ -553,7 +553,7 @@ class ClientController out << "Platform version: " << platformInfo.getPlatformVersion() << std::endl; out << "Manufacturer name: " << platformInfo.getManufacturerName() << std::endl; out << "Manufacturer url: " << platformInfo.getManufacturerUrl() << std::endl; - out << "Modle number: " << platformInfo.getModelNumber() << std::endl; + out << "Model number: " << platformInfo.getModelNumber() << std::endl; out << "Date of manufacture: " << platformInfo.getDateOfManfacture() << std::endl; out << "Operatio system version: " << platformInfo.getOSVersion() << std::endl; out << "Hardware version: " << platformInfo.getHardwareVersion() << std::endl; -- 2.7.4