2 new revisions:

Revision: 7ca6d92a50ca
Author:   mranga <mranga@8e71dc83-d81e-6649-80f2-80b843a9b2be>
Date:     Tue Jul  3 16:15:04 2012
Log:      Update Issue 5...
http://code.google.com/p/jain-sip/source/detail?r=7ca6d92a50ca

Revision: b8f59854b52c
Author:   mranga <mranga@8e71dc83-d81e-6649-80f2-80b843a9b2be>
Date:     Tue Jul  3 16:42:11 2012
Log:      Update Issue 6...
http://code.google.com/p/jain-sip/source/detail?r=b8f59854b52c

==============================================================================
Revision: 7ca6d92a50ca
Author:   mranga <mranga@8e71dc83-d81e-6649-80f2-80b843a9b2be>
Date:     Tue Jul  3 16:15:04 2012
Log:      Update Issue 5

JSIP-426: Parser error in parsing origin field.
Backporting to TelScale

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2124 8e71dc83-d81e-6649-80f2-80b843a9b2be
(cherry picked from commit 01d3c81d92fa7f220c14cb800a3f6fadd0f9a28f)

http://code.google.com/p/jain-sip/source/detail?r=7ca6d92a50ca

Modified:
 /src/gov/nist/core/LexerCore.java
 /src/gov/nist/javax/sdp/parser/OriginFieldParser.java

=======================================
--- /src/gov/nist/core/LexerCore.java   Fri May  4 10:37:24 2012
+++ /src/gov/nist/core/LexerCore.java   Tue Jul  3 16:15:04 2012
@@ -42,6 +42,7 @@
     public static final int START = 2048;
     public static final int END = START + 2048;
     // IMPORTANT -- This should be < END
+    public static final int ID_NO_WHITESPACE = END - 3;
     public static final int ID = END - 1;
     public static final int SAFE = END - 2;
     // Individial token classes.
@@ -156,6 +157,10 @@
     public String getNextId() {
         return ttoken();
     }
+
+    public String getNextIdNoWhiteSpace() {
+        return ttokenNoWhiteSpace();
+    }

     // call this after you call match
     public Token getNextToken() {
@@ -223,6 +228,13 @@
                 this.currentMatch = new Token();
                 this.currentMatch.tokenValue = id;
                 this.currentMatch.tokenType = SAFE;
+            } else if (tok == ID_NO_WHITESPACE) {
+                if (!startsIdNoWhiteSpace())
+ throw new ParseException(buffer + "\nID no white space expected", ptr);
+                String id = getNextIdNoWhiteSpace();
+                this.currentMatch = new Token();
+                this.currentMatch.tokenValue = id;
+                this.currentMatch.tokenType = ID_NO_WHITESPACE;
             } else {
                 String nexttok = getNextId();
Integer cur = (Integer) currentLexer.get(nexttok.toUpperCase());
@@ -327,6 +339,15 @@
             return false;
         }
     }
+
+    public boolean startsIdNoWhiteSpace() {
+        try {
+            char nextChar = lookAhead(0);
+            return nextChar != ' ' && nextChar != '\t' && nextChar != '\n';
+        } catch (ParseException ex) {
+            return false;
+        }
+    }

     public boolean startsSafeToken() {
         try {
@@ -388,46 +409,22 @@
         }
     }

-    /* JvB: unreferenced
-    public String ttokenAllowSpace() {
+    public String ttokenNoWhiteSpace() {
         int startIdx = ptr;
         try {
             while (hasMoreChars()) {
                 char nextChar = lookAhead(0);
-                if (isAlphaDigit(nextChar)) {
-                    consume(1);
-                }
-                else {
-                    boolean isValidChar = false;
-                    switch (nextChar) {
-                        case '_':
-                        case '+':
-                        case '-':
-                        case '!':
-                        case '`':
-                        case '\'':
-                        case '~':
- case '%': // bug fix by Bruno Konik, JvB copied here
-                        case '.':
-                        case ' ':
-                        case '\t':
-                        case '*':
-                            isValidChar = true;
-                    }
-                    if (isValidChar) {
-                        consume(1);
-                    }
-                    else {
-                        break;
-                    }
-                }
-
-            }
-            return buffer.substring(startIdx, ptr);
+ if ( nextChar == ' ' || nextChar == '\n' || nextChar == '\t' ) {
+                       break;
+                } else {
+                     consume(1);
+                }
+            }
+            return String.valueOf(buffer, startIdx, ptr - startIdx);
         } catch (ParseException ex) {
             return null;
         }
-    }*/
+    }

     public String ttokenSafe() {
         int startIdx = ptr;
=======================================
--- /src/gov/nist/javax/sdp/parser/OriginFieldParser.java Fri Jul 17 11:57:24 2009 +++ /src/gov/nist/javax/sdp/parser/OriginFieldParser.java Tue Jul 3 16:15:04 2012
@@ -49,7 +49,7 @@
             lexer.match('=');
             lexer.SPorHT();

-            lexer.match(LexerCore.SAFE);
+            lexer.match(LexerCore.ID_NO_WHITESPACE);
             Token userName = lexer.getNextToken();
             originField.setUsername(userName.getTokenValue());
             this.lexer.SPorHT();

==============================================================================
Revision: b8f59854b52c
Author:   mranga <mranga@8e71dc83-d81e-6649-80f2-80b843a9b2be>
Date:     Tue Jul  3 16:42:11 2012
Log:      Update Issue 6

JSIP-425: UdpMessageChannel incorrectly closed when caching of Sever Connections is disabled
Inbox

Backporting to TelScale

git-svn-id: https://svn.java.net/svn/jsip~svn/trunk@2125 8e71dc83-d81e-6649-80f2-80b843a9b2be
(cherry picked from commit 30980195305ada299c7d307b102362a66b1f80f4)

http://code.google.com/p/jain-sip/source/detail?r=b8f59854b52c

Modified:
 /src/gov/nist/javax/sip/stack/SIPServerTransaction.java

=======================================
--- /src/gov/nist/javax/sip/stack/SIPServerTransaction.java Wed Mar 21 12:53:59 2012 +++ /src/gov/nist/javax/sip/stack/SIPServerTransaction.java Tue Jul 3 16:42:11 2012
@@ -1988,7 +1988,7 @@
         }

         // Uncache the server tx
-        if ((!sipStack.cacheServerConnections)
+        if ((!sipStack.cacheServerConnections) && isReliable()
                 && --getMessageChannel().useCount <= 0) {
             // Close the encapsulated socket if stack is configured
             close();

Reply via email to