Closed Greg-C10 closed 3 months ago
wifi.c implements odid_message_process_pack from opendroneid.h.
It does not return 0 on success. It is returning size.
from opendroneid.h:
int odid_message_process_pack(ODID_UAS_Data UAS_Data, uint8_t pack, size_t buflen);
/* odid_wifi_receive_message_pack_nan_action_frame - processes a received message pack
Implementation in wifi.c:
int odid_message_process_pack(ODID_UAS_Data UAS_Data, uint8_t pack, size_t buflen) { ODID_MessagePack_encoded msg_pack_enc = (ODID_MessagePack_encoded ) pack; size_t size = sizeof(msg_pack_enc) - ODID_MESSAGE_SIZE (ODID_PACK_MAX_MESSAGES - msg_pack_enc->MsgPackSize); if (size > buflen) return -ENOMEM;
odid_initUasData(UAS_Data); if (decodeMessagePack(UAS_Data, msg_pack_enc) != ODID_SUCCESS) return -1; return (int) size;
}
Fixed on this commit .
wifi.c implements odid_message_process_pack from opendroneid.h.
It does not return 0 on success. It is returning size.
from opendroneid.h:
int odid_message_process_pack(ODID_UAS_Data UAS_Data, uint8_t pack, size_t buflen);
/* odid_wifi_receive_message_pack_nan_action_frame - processes a received message pack
Implementation in wifi.c:
int odid_message_process_pack(ODID_UAS_Data UAS_Data, uint8_t pack, size_t buflen) { ODID_MessagePack_encoded msg_pack_enc = (ODID_MessagePack_encoded ) pack; size_t size = sizeof(msg_pack_enc) - ODID_MESSAGE_SIZE (ODID_PACK_MAX_MESSAGES - msg_pack_enc->MsgPackSize); if (size > buflen) return -ENOMEM;
}