Skip to content

Commit d961a9e

Browse files
committed
correct issue where RTP sequences were not stepped appropriately;
1 parent 7a39cdd commit d961a9e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/host/modem/port/specialized/V24UDPPort.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ V24UDPPort::V24UDPPort(uint32_t peerId, const std::string& address, uint16_t mod
7777
m_peerId(peerId),
7878
m_streamId(0U),
7979
m_timestamp(INVALID_TS),
80-
m_pktSeq(0U),
80+
m_pktSeq(32U),
8181
m_fscState(CS_NOT_CONNECTED),
8282
m_modemState(STATE_P25),
8383
m_tx(false),
@@ -195,7 +195,7 @@ void V24UDPPort::clock(uint32_t ms)
195195

196196
void V24UDPPort::reset()
197197
{
198-
m_pktSeq = 0U;
198+
m_pktSeq = 32U;
199199
m_timestamp = INVALID_TS;
200200
m_streamId = createStreamId();
201201
}
@@ -291,6 +291,10 @@ int V24UDPPort::write(const uint8_t* buffer, uint32_t length)
291291
bool written = m_socket->write(message, messageLen, m_remoteRTPAddr, m_remoteRTPAddrLen);
292292
if (written)
293293
return length;
294+
295+
m_pktSeq++;
296+
if (m_pktSeq == RTP_END_OF_CALL_SEQ)
297+
m_pktSeq = 32U;
294298
} else {
295299
writeNAK(CMD_P25_DATA, RSN_INVALID_REQUEST);
296300
return int(length);

0 commit comments

Comments
 (0)