Browse Source

Merge pull request #290 from jitsi/fix_disable_tcp

Remove 'ssltcp' candidates when 'webrtcIceTcpDisable' = true
dev1
bgrozev 9 years ago
parent
commit
298fd3a7f3
2 changed files with 5 additions and 3 deletions
  1. 1
    1
      modules/xmpp/JingleSessionPC.js
  2. 4
    2
      modules/xmpp/SDP.js

+ 1
- 1
modules/xmpp/JingleSessionPC.js View File

102
             var protocol = candidate.protocol;
102
             var protocol = candidate.protocol;
103
             if (typeof protocol === 'string') {
103
             if (typeof protocol === 'string') {
104
                 protocol = protocol.toLowerCase();
104
                 protocol = protocol.toLowerCase();
105
-                if (protocol == 'tcp') {
105
+                if (protocol === 'tcp' || protocol ==='ssltcp') {
106
                     if (self.webrtcIceTcpDisable)
106
                     if (self.webrtcIceTcpDisable)
107
                         return;
107
                         return;
108
                 } else if (protocol == 'udp') {
108
                 } else if (protocol == 'udp') {

+ 4
- 2
modules/xmpp/SDP.js View File

399
                 var protocol = (candidate &&
399
                 var protocol = (candidate &&
400
                         typeof candidate.protocol === 'string')
400
                         typeof candidate.protocol === 'string')
401
                     ? candidate.protocol.toLowerCase() : '';
401
                     ? candidate.protocol.toLowerCase() : '';
402
-                if ((self.removeTcpCandidates && protocol === 'tcp') ||
402
+                if ((self.removeTcpCandidates
403
+                        && (protocol === 'tcp' || protocol === 'ssltcp')) ||
403
                     (self.removeUdpCandidates && protocol === 'udp')) {
404
                     (self.removeUdpCandidates && protocol === 'udp')) {
404
                     return;
405
                     return;
405
                 }
406
                 }
606
         var protocol = this.getAttribute('protocol');
607
         var protocol = this.getAttribute('protocol');
607
         protocol = (typeof protocol === 'string') ? protocol.toLowerCase(): '';
608
         protocol = (typeof protocol === 'string') ? protocol.toLowerCase(): '';
608
 
609
 
609
-        if ((self.removeTcpCandidates && protocol === 'tcp') ||
610
+        if ((self.removeTcpCandidates
611
+                && (protocol === 'tcp' || protocol === 'ssltcp')) ||
610
             (self.removeUdpCandidates && protocol === 'udp')) {
612
             (self.removeUdpCandidates && protocol === 'udp')) {
611
             return;
613
             return;
612
         } else  if (self.failICE) {
614
         } else  if (self.failICE) {

Loading…
Cancel
Save