Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MmsValue_setOctetString input buf is const now #353

Open
wants to merge 1 commit into
base: v1.5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mms/inc/mms_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ MmsValue_getBinaryTimeAsUtcMs(const MmsValue* self);
* \param size the size of the buffer that contains the new value
*/
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.
Expand Down
2 changes: 1 addition & 1 deletion src/mms/iso_mms/common/mms_value.c
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ MmsValue_newOctetString(int size, int maxSize)
}

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) {
memcpy(self->value.octetString.buf, buf, size);
Expand Down