Commit cb6bd1b8 authored by Guillaume Beraudo's avatar Guillaume Beraudo

RtpTransport close function.

parent 728617bf
......@@ -92,8 +92,7 @@ typedef struct _RtpTransport
int (*t_sendto)(struct _RtpTransport *t, mblk_t *msg , int flags, const struct sockaddr *to, socklen_t tolen);
int (*t_recvfrom)(struct _RtpTransport *t, mblk_t *msg, int flags, struct sockaddr *from, socklen_t *fromlen);
struct _RtpSession *session;//<back pointer to the owning session, set by oRTP
void (*close_fn)(void *userData, struct _RtpTransport *transport);
void *close_data;
void (*t_close)(struct _RtpTransport *transport, void *userData);
} RtpTransport;
typedef struct _OrtpNetworkSimulatorParams{
......
......@@ -1327,12 +1327,12 @@ void rtp_session_release_sockets(RtpSession *session){
session->rtp.socket=-1;
session->rtcp.socket=-1;
if (session->rtp.tr && session->rtp.tr->close_fn)
session->rtp.tr->close_fn(session->rtp.tr->close_data, session->rtp.tr);
if (session->rtp.tr && session->rtp.tr->t_close)
session->rtp.tr->t_close(session->rtp.tr, session->rtp.tr->data);
session->rtp.tr = 0;
if (session->rtcp.tr && session->rtcp.tr->close_fn)
session->rtcp.tr->close_fn(session->rtcp.tr->close_data, session->rtcp.tr);
if (session->rtcp.tr && session->rtcp.tr->t_close)
session->rtcp.tr->t_close(session->rtcp.tr, session->rtcp.tr->data);
session->rtcp.tr = 0;
/* don't discard remote addresses, then can be preserved for next use.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment