- IEC 61850 server: fixed problem when "ResvTms" is missing in BRCB

pull/147/head
Michael Zillgith 7 years ago
parent 45fd6919a8
commit 0e7fcb0c29

@ -1616,6 +1616,7 @@ checkReservationTimeout(ReportControl* rc)
#if (CONFIG_IEC61850_BRCB_WITH_RESVTMS == 1)
MmsValue* resvTmsVal = ReportControl_getRCBValue(rc, "ResvTms");
if (resvTmsVal)
MmsValue_setInt16(resvTmsVal, rc->resvTms);
#endif
@ -1673,6 +1674,7 @@ reserveRcb(ReportControl* rc, MmsServerConnection connection)
#if (CONFIG_IEC61850_BRCB_WITH_RESVTMS == 1)
MmsValue* resvTmsVal = ReportControl_getRCBValue(rc, "ResvTms");
if (resvTmsVal)
MmsValue_setInt16(resvTmsVal, rc->resvTms);
#endif
@ -2078,6 +2080,7 @@ Reporting_deactivateReportsForConnection(MmsMapping* self, MmsServerConnection c
rc->reserved = false;
if (rc->buffered == false) {
MmsValue* resv = ReportControl_getRCBValue(rc, "Resv");
MmsValue_setBoolean(resv, false);

@ -734,10 +734,12 @@ mmsMsg_parseFileReadResponse(uint8_t* buffer, int bufPos, int maxBufPos, int frs
bufPos += length;
break;
case 0x81: /* moreFollows */
*moreFollows = BerDecoder_decodeBoolean(buffer, bufPos);
bufPos += length;
break;
default:
bufPos += length;
if (DEBUG_MMS_CLIENT)

@ -586,7 +586,6 @@ MmsValue*
MmsValue_newIntegerFromInt8(int8_t integer)
{
MmsValue* self = (MmsValue*) GLOBAL_CALLOC(1, sizeof(MmsValue));
;
self->type = MMS_INTEGER;
self->value.integer = BerInteger_createFromInt32((int32_t) integer);
@ -598,7 +597,6 @@ MmsValue*
MmsValue_newIntegerFromInt16(int16_t integer)
{
MmsValue* self = (MmsValue*) GLOBAL_CALLOC(1, sizeof(MmsValue));
;
self->type = MMS_INTEGER;
self->value.integer = BerInteger_createFromInt32((int32_t) integer);
@ -832,7 +830,6 @@ MmsValue*
MmsValue_newUnsignedFromUint32(uint32_t integer)
{
MmsValue* self = (MmsValue*) GLOBAL_CALLOC(1, sizeof(MmsValue));
;
if (self == NULL)
return NULL;
@ -847,7 +844,6 @@ MmsValue*
MmsValue_newIntegerFromInt64(int64_t integer)
{
MmsValue* self = (MmsValue*) GLOBAL_CALLOC(1, sizeof(MmsValue));
;
if (self == NULL)
return NULL;
@ -913,8 +909,6 @@ MmsValue_toFloat(const MmsValue* self)
return val;
}
}
else
printf("MmsValue_toFloat: conversion error. Wrong type!\n");
return 0.f;
}

@ -253,7 +253,6 @@ MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection self, c
uint32_t informationReportContentSize = variableAccessSpecSize + listOfAccessResultSize;
informationReportSize = 1 + informationReportContentSize +
BerEncoder_determineLengthSize(informationReportContentSize);

Loading…
Cancel
Save