avoid hton conversion on empty management msgs

Signed-off-by: Geoff Salmon <gsalmon@se-instruments.com>
master
Geoff Salmon 2013-02-11 17:49:17 -05:00 committed by Richard Cochran
parent c547145834
commit a299ca1e90
1 changed files with 2 additions and 1 deletions

1
tlv.c
View File

@ -269,6 +269,7 @@ void tlv_pre_send(struct TLV *tlv)
switch (tlv->type) {
case TLV_MANAGEMENT:
mgt = (struct management_tlv *) tlv;
if (tlv->length > sizeof(mgt->id))
mgt_pre_send(mgt);
mgt->id = htons(mgt->id);
break;