This commit is contained in:
zvecr 2022-04-05 19:17:48 +01:00
parent d339f182ba
commit 194d6d65be
3 changed files with 12 additions and 12 deletions

View File

@ -1155,10 +1155,10 @@ void xap_send(xap_token_t token, xap_response_flags_t response_flags, const void
}
void xap_broadcast(uint8_t type, const void *data, size_t length) {
uint8_t rdata[XAP_EPSIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
uint8_t rdata[XAP_EPSIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
if (length > (XAP_EPSIZE - sizeof(xap_broadcast_header_t))) return;

View File

@ -261,10 +261,10 @@ void xap_send(xap_token_t token, xap_response_flags_t response_flags, const void
}
void xap_broadcast(uint8_t type, const void *data, size_t length) {
uint8_t rdata[XAP_EPSIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
uint8_t rdata[XAP_EPSIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
if (length > (XAP_EPSIZE - sizeof(xap_broadcast_header_t))) return;

View File

@ -222,10 +222,10 @@ void xap_send(xap_token_t token, xap_response_flags_t response_flags, const void
}
void xap_broadcast(uint8_t type, const void *data, size_t length) {
uint8_t rdata[XAP_BUFFER_SIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
uint8_t rdata[XAP_BUFFER_SIZE] = {0};
xap_broadcast_header_t *header = (xap_broadcast_header_t *)&rdata[0];
header->token = XAP_BROADCAST_TOKEN;
header->type = type;
if (length > (XAP_BUFFER_SIZE - sizeof(xap_broadcast_header_t))) return;