Minor fix in UDP media: transport should silently ignore detach command when it's not attached
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@830 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
5b1e14d2f3
commit
19361c83b8
|
@ -583,19 +583,21 @@ static void transport_detach( pjmedia_transport *tp,
|
|||
|
||||
pj_assert(tp);
|
||||
|
||||
/* User data is unreferenced on Release build */
|
||||
PJ_UNUSED_ARG(user_data);
|
||||
if (udp->attached) {
|
||||
/* User data is unreferenced on Release build */
|
||||
PJ_UNUSED_ARG(user_data);
|
||||
|
||||
/* As additional checking, check if the same user data is specified */
|
||||
pj_assert(user_data == udp->user_data);
|
||||
/* As additional checking, check if the same user data is specified */
|
||||
pj_assert(user_data == udp->user_data);
|
||||
|
||||
/* First, mark transport as unattached */
|
||||
udp->attached = PJ_FALSE;
|
||||
/* First, mark transport as unattached */
|
||||
udp->attached = PJ_FALSE;
|
||||
|
||||
/* Clear up application infos from transport */
|
||||
udp->rtp_cb = NULL;
|
||||
udp->rtcp_cb = NULL;
|
||||
udp->user_data = NULL;
|
||||
/* Clear up application infos from transport */
|
||||
udp->rtp_cb = NULL;
|
||||
udp->rtcp_cb = NULL;
|
||||
udp->user_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue