[Freeswitch-svn] [commit] r13411 - freeswitch/trunk/src
FreeSWITCH SVN
brian at freeswitch.org
Thu May 21 08:18:21 PDT 2009
Author: brian
Date: Thu May 21 10:18:21 2009
New Revision: 13411
Log:
use our own handler so it won't get overriden by anyone if zrtp is on
Modified:
freeswitch/trunk/src/switch_rtp.c
Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c (original)
+++ freeswitch/trunk/src/switch_rtp.c Thu May 21 10:18:21 2009
@@ -1059,8 +1059,6 @@
zrtp_stream_set_userdata(rtp_session->zrtp_ctx, rtp_session);
zrtp_stream_start(rtp_session->zrtp_ctx, rtp_session->ssrc);
-
- switch_rtp_set_invald_handler(rtp_session, zrtp_handler);
}
#endif
@@ -1772,11 +1770,19 @@
if (bytes && rtp_session->recv_msg.header.version != 2) {
uint8_t *data = (uint8_t *) rtp_session->recv_msg.body;
if (rtp_session->recv_msg.header.version == 0) {
- if (rtp_session->ice_user) {
- handle_ice(rtp_session, (void *) &rtp_session->recv_msg, bytes);
- } else if (rtp_session->remote_stun_addr) {
- handle_stun_ping_reply(rtp_session, (void *) &rtp_session->recv_msg, bytes);
+#ifdef ENABLE_ZRTP
+ if (zrtp_on && ZRTP_PACKETS_MAGIC == zrtp_ntoh32(rtp_session->recv_msg.header.ts)) {
+ zrtp_handler(rtp_session, rtp_session->sock_input, (void *) &rtp_session->recv_msg, bytes, rtp_session->from_addr);
+ } else {
+#endif
+ if (rtp_session->ice_user) {
+ handle_ice(rtp_session, (void *) &rtp_session->recv_msg, bytes);
+ } else if (rtp_session->remote_stun_addr) {
+ handle_stun_ping_reply(rtp_session, (void *) &rtp_session->recv_msg, bytes);
+ }
+#ifdef ENABLE_ZRTP
}
+#endif
}
if (rtp_session->invalid_handler) {
More information about the Freeswitch-svn
mailing list