Fix mistake in IMM set property

There was a mistake in the code to attempt length calculation.

Change-Id: I62dbd78ec11095d897433754a5751c02fd0d5812
This commit is contained in:
Jarrod Johnson 2019-03-21 09:47:17 -04:00
parent 8b89c3e5a0
commit 0bdf26f8c9

@ -265,8 +265,8 @@ class IMMClient(object):
raise Exception('Unsupported property value')
propname = propname.encode('utf-8')
proplen = len(propname) | 0b10000000
valuelen = 0x11
cmdlen = len(propname) + len(valuelen) + 3
valuelen = 0x11 # The value is always one byte, for now
cmdlen = len(propname) + 4 # the flags byte, two tlv bytes, and value
cdata = bytearray([3, 0, cmdlen, 1, proplen]) + propname
cdata += bytearray([valuelen, value])
rsp = self.ipmicmd.xraw_command(netfn=0x3a, command=0xc4, data=cdata)