Revision: 39f572bc216c
Author:   Jean Deruelle <[email protected]>
Date:     Wed Oct  9 13:28:33 2013 UTC
Log:      Fixes Issue #19

http://code.google.com/p/jain-sip/source/detail?r=39f572bc216c&repo=javascript

Modified:
 /src/main/javascript/jain-sip/gov/nist/sip/stack/SIPClientTransaction.js

=======================================
--- /src/main/javascript/jain-sip/gov/nist/sip/stack/SIPClientTransaction.js Tue Mar 12 15:26:19 2013 UTC +++ /src/main/javascript/jain-sip/gov/nist/sip/stack/SIPClientTransaction.js Wed Oct 9 13:28:33 2013 UTC
@@ -25,6 +25,7 @@
  *  @see  gov/nist/javax/sip/stack/SIPClientTransaction.java
  *  @author Yuemin Qin ([email protected])
  *  @author Laurent STRULLU ([email protected])
+ *  @author Jean Deruelle ([email protected])
  *  @version 1.0
  *
  */
@@ -277,8 +278,8 @@
                         this.setDialog(dialog, dialog.getDialogId());
                     }
                 } else {
- console.error("SIPClientTransaction:processResponseargu2(): response without from-tag"); - throw "SIPClientTransaction:processResponseargu2(): response without from-tag"; + console.error("SIPClientTransaction:processResponseargu2(): response without from-tag " + sipResponse); + throw "SIPClientTransaction:processResponseargu2(): response without from-tag " + sipResponse;
                 }
             } else {
                 if (this.sipStack.isAutomaticDialogSupportEnabled) {
@@ -747,11 +748,15 @@
if(logger!=undefined) logger.debug("SIPClientTransaction:checkFromTag():sipResponse="+sipResponse);
     var originalFromTag = this.getRequest().getFromTag();
     if (this.defaultDialog != null) {
+ // Added for https://code.google.com/p/webrtcomm/issues/detail?id=19 as XOR below is not enough
+       if (originalFromTag == null && sipResponse.getFrom().getTag() == null) {
+               return false;
+       }
if (originalFromTag == null ^ sipResponse.getFrom().getTag() == null) {
             return false;
         }
- if (originalFromTag.toLowerCase()!=sipResponse.getFrom().getTag().toLowerCase()
-            && originalFromTag != null) {
+        if (originalFromTag != null &&
+ originalFromTag.toLowerCase()!=sipResponse.getFrom().getTag().toLowerCase()) {
             return false;
         }
     }

--

--- You received this message because you are subscribed to the Google Groups "mobicents-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to