- additionally allow comma and space as separators in ap-titles used in API functions

pull/179/head
Michael Zillgith 6 years ago
parent daff495246
commit 7cb69c983a

@ -1158,7 +1158,6 @@ IedServer_updateBooleanAttributeValue(IedServer self, DataAttribute* dataAttribu
bool currentValue = MmsValue_getBoolean(dataAttribute->mmsValue); bool currentValue = MmsValue_getBoolean(dataAttribute->mmsValue);
if (currentValue == value) { if (currentValue == value) {
checkForUpdateTrigger(self, dataAttribute); checkForUpdateTrigger(self, dataAttribute);
} }
else { else {

@ -400,8 +400,20 @@ BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufL
int x = atoi(oidString); int x = atoi(oidString);
char sepChar = '.';
const char* separator = strchr(oidString, '.'); const char* separator = strchr(oidString, '.');
if (separator == NULL) {
sepChar = ',';
separator = strchr(oidString, ',');
}
if (separator == NULL) {
sepChar = ' ';
separator = strchr(oidString, ',');
}
if (separator == NULL) return 0; if (separator == NULL) return 0;
int y = atoi(separator + 1); int y = atoi(separator + 1);
@ -416,7 +428,7 @@ BerEncoder_encodeOIDToBuffer(const char* oidString, uint8_t* buffer, int maxBufL
encodedBytes++; encodedBytes++;
while (1) { while (1) {
separator = strchr(separator + 1, '.'); separator = strchr(separator + 1, sepChar);
if (separator == NULL) if (separator == NULL)
break; break;

Loading…
Cancel
Save