Revision: 15171
Author: [email protected]
Date: Wed Nov 10 03:17:09 2010
Log: Update Issue 2088
Backporting changes to the JBCP 5.X branch
http://code.google.com/p/mobicents/source/detail?r=15171
Modified:
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
=======================================
---
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Mon Nov 8 02:56:22 2010
+++
/branches/jbcp/5.x-mead/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/SipApplicationDispatcherImpl.java
Wed Nov 10 03:17:09 2010
@@ -881,33 +881,33 @@
}
if(sipSessionImpl != null) {
- final ProxyImpl proxy =
sipSessionImpl.getProxy();
- if(!invalidateProxySession && (proxy == null || (proxy != null &&
proxy.getFinalBranchForSubsequentRequests() != null
&& !proxy.getFinalBranchForSubsequentRequests().getRecordRoute()))) {
-
if(logger.isDebugEnabled()) {
- logger.debug("try to Invalidate Proxy session if it is non record
routing " + sipSessionKey);
- }
- invalidateProxySession
= true;
- }
- // If this is a client transaction no need to invalidate proxy
session http://code.google.com/p/mobicents/issues/detail?id=1024
- if(!invalidateProxySession) {
+
sipContext.enterSipApp(sipApplicationSession, sipSessionImpl);
+ try {
+ final ProxyImpl proxy =
sipSessionImpl.getProxy();
+ if(!invalidateProxySession && (proxy == null || (proxy != null &&
proxy.getFinalBranchForSubsequentRequests() != null
&& !proxy.getFinalBranchForSubsequentRequests().getRecordRoute()))) {
+
if(logger.isDebugEnabled()) {
+ logger.debug("try to Invalidate Proxy session if it is non record
routing " + sipSessionKey);
+ }
+
invalidateProxySession = true;
+ }
+ // If this is a client transaction no need to invalidate proxy
session http://code.google.com/p/mobicents/issues/detail?id=1024
+
if(!invalidateProxySession) {
+
if(logger.isDebugEnabled()) {
+
logger.debug("don't Invalidate Proxy session");
+ }
+ return;
+ }
if(logger.isDebugEnabled()) {
- logger.debug("don't
Invalidate Proxy session");
- }
- return;
- }
- if(logger.isDebugEnabled()) {
- logger.debug("sip session " + sipSessionKey + " is valid ? :" +
sipSessionImpl.isValidInternal());
-
if(sipSessionImpl.isValidInternal()) {
- logger.debug("Sip session " + sipSessionKey + " is ready to be
invalidated ? :" + sipSessionImpl.isReadyToInvalidate());
- }
- }
- if(sipSessionImpl.isValidInternal() &&
sipSessionImpl.isReadyToInvalidate()) {
-
sipContext.enterSipApp(sipApplicationSession, sipSessionImpl);
- try {
+ logger.debug("sip session " + sipSessionKey + " is valid ? :" +
sipSessionImpl.isValidInternal());
+
if(sipSessionImpl.isValidInternal()) {
+ logger.debug("Sip session " + sipSessionKey + " is ready to be
invalidated ? :" + sipSessionImpl.isReadyToInvalidate());
+ }
+ }
+ if(sipSessionImpl.isValidInternal() &&
sipSessionImpl.isReadyToInvalidate()) {
sipSessionImpl.onTerminatedState();
- } finally {
-
sipContext.exitSipApp(sipApplicationSession, sipSessionImpl);
- }
+ }
+ } finally {
+
sipContext.exitSipApp(sipApplicationSession, sipSessionImpl);
}
} else {
if(logger.isDebugEnabled()) {
@@ -915,19 +915,19 @@
}
}
if(sipApplicationSession != null) {
- if(logger.isDebugEnabled()) {
- logger.debug("sip app session " + sipApplicationSession.getKey()
+ " is valid ? :" + sipApplicationSession.isValidInternal());
-
if(sipApplicationSession.isValidInternal()) {
- logger.debug("Sip app session " + sipApplicationSession.getKey()
+ " is ready to be invalidated ? :" +
sipApplicationSession.isReadyToInvalidate());
- }
- }
- if(sipApplicationSession.isValidInternal() &&
sipApplicationSession.isReadyToInvalidate()) {
-
sipContext.enterSipApp(sipApplicationSession, sipSessionImpl);
- try {
+
sipContext.enterSipApp(sipApplicationSession, sipSessionImpl);
+ try {
+
if(logger.isDebugEnabled()) {
+ logger.debug("sip app session " + sipApplicationSession.getKey()
+ " is valid ? :" + sipApplicationSession.isValidInternal());
+
if(sipApplicationSession.isValidInternal()) {
+ logger.debug("Sip app session " + sipApplicationSession.getKey()
+ " is ready to be invalidated ? :" +
sipApplicationSession.isReadyToInvalidate());
+ }
+ }
+ if(sipApplicationSession.isValidInternal() &&
sipApplicationSession.isReadyToInvalidate()) {
sipApplicationSession.tryToInvalidate();
- } finally {
-
sipContext.exitSipApp(sipApplicationSession, sipSessionImpl);
- }
+ }
+ } finally {
+
sipContext.exitSipApp(sipApplicationSession, sipSessionImpl);
}
}