mesh: extract set flag MESH_NETWORK_PDU_FLAGS_RELAY when queue received message for transmission

This commit is contained in:
Matthias Ringwald 2019-06-27 15:48:22 +02:00
parent 90f8142e51
commit ec22fe6707
2 changed files with 3 additions and 2 deletions

View File

@ -355,7 +355,7 @@ static void mesh_network_relay_message(mesh_network_pdu_t * network_pdu){
// prepare pdu for resending
network_pdu->len -= net_mic_len;
network_pdu->data[1] = (ctl << 7) | (ttl - 1);
network_pdu->flags |= MESH_NETWORK_PDU_FLAGS_RELAY;
// queue up
network_pdu->callback = &mesh_network_send_d;
btstack_linked_list_add_tail(&network_pdus_queued, (btstack_linked_item_t *) network_pdu);

View File

@ -76,7 +76,8 @@ typedef struct mesh_pdu {
//
#define MESH_NETWORK_PDU_FLAGS_PROXY_CONFIGURATION 1
#define MESH_NETWORK_PDU_FLAGS_GATT_BEARER 2
#define MESH_NETWORK_PDU_FLAGS_GATT_BEARER 2
#define MESH_NETWORK_PDU_FLAGS_RELAY 4
typedef struct mesh_network_pdu {
mesh_pdu_t pdu_header;