Fix BTP packets ID fwding to Apps

This commit is contained in:
emanuel 2023-04-18 11:42:49 +01:00
parent 36f86e78e6
commit 258a405dc8
1 changed files with 3 additions and 3 deletions

View File

@ -816,7 +816,7 @@ int transport_indication_btp(BTPPacketIndication_t* bpi, void** security_socket)
fi->present = FacilitiesIndication_PR_message; fi->present = FacilitiesIndication_PR_message;
FacilitiesMessageIndication_t *fmi = &fi->choice.message; FacilitiesMessageIndication_t *fmi = &fi->choice.message;
fmi->id = id; fmi->id = bpi->id;
fmi->itsMessageType = bpi->destinationPort; fmi->itsMessageType = bpi->destinationPort;
@ -828,7 +828,7 @@ int transport_indication_btp(BTPPacketIndication_t* bpi, void** security_socket)
buffer[0] = 4; // Facilities buffer[0] = 4; // Facilities
asn_enc_rval_t enc = oer_encode_to_buffer(&asn_DEF_FacilitiesIndication, NULL, fi, buffer + 1, ITSS_SDU_MAX_LEN - 1); asn_enc_rval_t enc = oer_encode_to_buffer(&asn_DEF_FacilitiesIndication, NULL, fi, buffer + 1, ITSS_SDU_MAX_LEN - 1);
itss_queue_send(facilities.tx_queue, buffer, enc.encoded + 1, ITSS_APPLICATIONS, id, "FI.message"); itss_queue_send(facilities.tx_queue, buffer, enc.encoded + 1, ITSS_APPLICATIONS, bpi->id, "FI.message");
} }
// Logging // Logging
@ -836,7 +836,7 @@ int transport_indication_btp(BTPPacketIndication_t* bpi, void** security_socket)
pthread_mutex_lock(&facilities.id.lock); pthread_mutex_lock(&facilities.id.lock);
uint32_t station_id = facilities.id.station_id; uint32_t station_id = facilities.id.station_id;
pthread_mutex_unlock(&facilities.id.lock); pthread_mutex_unlock(&facilities.id.lock);
itss_db_add(facilities.logging.dbms, station_id, id, false, its_msg_type, NULL, bpi->data.buf, bpi->data.size); itss_db_add(facilities.logging.dbms, station_id, bpi->id, false, its_msg_type, NULL, bpi->data.buf, bpi->data.size);
} }
if (facilities.logging.recorder) { if (facilities.logging.recorder) {
int e = itss_management_record_packet_sdu( int e = itss_management_record_packet_sdu(