Commit 6f009177 authored by Ghislain MARY's avatar Ghislain MARY

Add socket type information (RTP or RTCP) when notifying STUN packet received...

Add socket type information (RTP or RTCP) when notifying STUN packet received on RTP or RTCP socket.
parent 6ed52ff8
......@@ -26,6 +26,11 @@ typedef mblk_t OrtpEvent;
typedef unsigned long OrtpEventType;
typedef enum {
OrtpRTPSocket,
OrtpRTCPSocket
} OrtpSocketType;
typedef struct RtpEndpoint{
#ifdef ORTP_INET6
struct sockaddr_storage addr;
......@@ -47,6 +52,7 @@ struct _OrtpEventData{
char sas[5]; // 4 characters
bool_t verified;
} zrtp_sas;
OrtpSocketType socket_type;
} info;
};
......
......@@ -83,6 +83,7 @@ void rtp_session_rtp_parse(RtpSession *session, mblk_t *mp, uint32_t local_str_t
OrtpEventData *ed=ortp_event_get_data(ev);
ed->packet=mp;
ed->ep=rtp_endpoint_new(addr,addrlen);
ed->info.socket_type = OrtpRTPSocket;
rtp_session_dispatch_event(session,ev);
return;
}
......
......@@ -1163,6 +1163,7 @@ static int process_rtcp_packet( RtpSession *session, mblk_t *block, struct socka
OrtpEventData *ed = ortp_event_get_data(ev);
ed->packet = block;
ed->ep = rtp_endpoint_new(addr, addrlen);
ed->info.socket_type = OrtpRTCPSocket;
rtp_session_dispatch_event(session, ev);
return -1;
}
......
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