- 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);
if (currentValue == value) {
checkForUpdateTrigger(self, dataAttribute);
}
else {

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

Loading…
Cancel
Save