- change array write handle way

pull/345/head
Kevin Jhang 4 years ago
parent 48c2a62f16
commit 407ee9048f

@ -607,17 +607,21 @@ ModelNode_getChild(ModelNode* self, const char* name)
/* check for separator */
const char* separator = strchr(name, '.');
/* skip array node */
if (name[0] == '[') {
return ModelNode_getChild(self, separator + 1);
}
/* check if name contains an array "(..)" */
const char* brace = strchr(name, '(');
int nameElementLength = 0;
if (separator != NULL)
nameElementLength = (separator - name);
if ((brace != NULL) && (brace < separator))
nameElementLength = (brace - name);
else
nameElementLength = (separator - name);
else
nameElementLength = strlen(name);
if (brace != NULL)
nameElementLength = (brace - name);
else
nameElementLength = strlen(name);
ModelNode* nextNode = self->firstChild;

@ -615,7 +615,6 @@ mmsServer_handleWriteRequest(
continue;
}
#if 0
if (alternateAccess != NULL) {
if (domain == NULL)
@ -675,7 +674,6 @@ mmsServer_handleWriteRequest(
goto end_of_main_loop;
}
#endif
/* Check for correct type */
if (MmsVariableSpecification_isValueOfType(variable, value) == false) {

Loading…
Cancel
Save