avoid hton conversion on empty management msgs
Signed-off-by: Geoff Salmon <gsalmon@se-instruments.com>master
parent
c547145834
commit
a299ca1e90
3
tlv.c
3
tlv.c
|
@ -269,7 +269,8 @@ void tlv_pre_send(struct TLV *tlv)
|
||||||
switch (tlv->type) {
|
switch (tlv->type) {
|
||||||
case TLV_MANAGEMENT:
|
case TLV_MANAGEMENT:
|
||||||
mgt = (struct management_tlv *) tlv;
|
mgt = (struct management_tlv *) tlv;
|
||||||
mgt_pre_send(mgt);
|
if (tlv->length > sizeof(mgt->id))
|
||||||
|
mgt_pre_send(mgt);
|
||||||
mgt->id = htons(mgt->id);
|
mgt->id = htons(mgt->id);
|
||||||
break;
|
break;
|
||||||
case TLV_MANAGEMENT_ERROR_STATUS:
|
case TLV_MANAGEMENT_ERROR_STATUS:
|
||||||
|
|
Loading…
Reference in New Issue