dynamic_cast is used for safe downcasting, so it makes
sense to always ensure whether this cast fails and returns
a null pointer.
Fixes an amount of cases reported by Coverity Scan, alike:
Dynamic cast to pointer dynamic_cast <sip_cseq *>(t->msg->cseq->p) can return NULL.
Assigning: t_cseq = dynamic_cast <sip_cseq *>(t->msg->cseq->p).
Unchecked dynamic_cast (FORWARD_NULL)
Dereferencing null pointer t_cseq.
Change-Id: I5f9bd1a316603ad88b3fdcb2425b4fe8bf99e6a8
Filtering by transaction type in trans_table::match_request() is necessary to avoid matching the ACK/200 UAC transaction when receiving a self-crafted ACK/200 and looking for the UAS transaction.
PRACK should be first matched using normal transaction matching to identify retransmissions. Then, it can be matched against the original INVITE transaction to disable the re-transmission timers.