MmsValue_setOctetString input buf is const now

pull/353/head
Joonas Harjumäki 4 years ago
parent 263c34f016
commit 233719dd1d

@ -552,7 +552,7 @@ MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
* \param size the size of the buffer that contains the new value * \param size the size of the buffer that contains the new value
*/ */
LIB61850_API void LIB61850_API void
MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size); MmsValue_setOctetString(MmsValue* self, const uint8_t* buf, int size);
/** /**
* \brief Returns the size in bytes of an MmsValue object of type MMS_OCTET_STRING. * \brief Returns the size in bytes of an MmsValue object of type MMS_OCTET_STRING.

@ -1418,7 +1418,7 @@ MmsValue_newOctetString(int size, int maxSize)
} }
void void
MmsValue_setOctetString(MmsValue* self, uint8_t* buf, int size) MmsValue_setOctetString(MmsValue* self, const uint8_t* buf, int size)
{ {
if (size <= self->value.octetString.maxSize) { if (size <= self->value.octetString.maxSize) {
memcpy(self->value.octetString.buf, buf, size); memcpy(self->value.octetString.buf, buf, size);

Loading…
Cancel
Save