Skip to content

Commit f0ef04b

Browse files
authored
Merge pull request #108 from ika-rwth-aachen/fix-udp-src-port
Fix setting of BTP destination port in `udp_msg.src_port`
2 parents 4b5e33d + 487b1c3 commit f0ef04b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

etsi_its_conversion/etsi_its_conversion/src/Converter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ UdpPacket Converter::bufferToUdpPacketMessage(const uint8_t* buffer, const int s
372372
UdpPacket udp_msg;
373373

374374
// add BTP destination port and destination port info
375+
udp_msg.src_port = btp_header_destination_port;
375376
uint16_t destination_port = htons(btp_header_destination_port);
376-
udp_msg.src_port = destination_port;
377377
if (has_btp_destination_port_) {
378378
uint16_t destination_port_info = 0;
379379
uint16_t* btp_header = new uint16_t[2] {destination_port, destination_port_info};

0 commit comments

Comments
 (0)