2 new revisions:

Revision: 051ce19ad2ea
Author:   Sergey Vetyutnev <[email protected]>
Date:     Mon Jul  1 11:19:33 2013
Log: Adding onDialogTimeout and onDialogRelease events into TCAP preview mo...
http://code.google.com/p/jss7/source/detail?r=051ce19ad2ea

Revision: f46cf0811cb4
Author:   Sergey Vetyutnev <[email protected]>
Date:     Mon Jul  1 11:26:56 2013
Log:      Merge remote-tracking branch 'origin/cap35'
http://code.google.com/p/jss7/source/detail?r=f46cf0811cb4

==============================================================================
Revision: 051ce19ad2ea
Author:   Sergey Vetyutnev <[email protected]>
Date:     Mon Jul  1 11:19:33 2013
Log: Adding onDialogTimeout and onDialogRelease events into TCAP preview mode
http://code.google.com/p/jss7/source/detail?r=051ce19ad2ea

Modified:
/tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/DialogImpl.java /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/PrevewDialogData.java /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/TCAPProviderImpl.java /tcap/tcap-impl/src/test/java/org/mobicents/protocols/ss7/tcap/PreviewModeFunctionalTest.java

=======================================
--- /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/DialogImpl.java Thu Jun 13 05:42:54 2013 +++ /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/DialogImpl.java Mon Jul 1 11:19:33 2013
@@ -414,6 +414,9 @@
     }

     public void keepAlive() {
+        if (this.previewMode)
+            return;
+
         try {
             this.dialogLock.lock();
             if (this.idleTimerInvoked) {
=======================================
--- /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/PrevewDialogData.java Tue Jun 18 12:56:52 2013 +++ /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/PrevewDialogData.java Mon Jul 1 11:19:33 2013
@@ -27,7 +27,6 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;

-import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.mobicents.protocols.ss7.tcap.api.TCAPStack;
 import org.mobicents.protocols.ss7.tcap.asn.ApplicationContextName;
@@ -160,22 +159,24 @@
             try {
                 dialogLock.lock();

-//                int i1 = provider.dialogPreviewList.size();
-                provider.removePreviewDialog(pdd);
-//                int i2 = provider.dialogPreviewList.size();
+// Dialog d1 = new DialogImpl(localAddress, remoteAddress, seqControl, provider._EXECUTOR, provider, pdd, sideB); + DialogImpl dlg = (DialogImpl)provider.getPreviewDialog(prevewDialogDataKey1, null, null, null, 0);
+                provider.timeout(dlg);
+                provider.removePreviewDialog(dlg);

-                if (logger.isEnabledFor(Level.ERROR)) {
-                    StringBuilder sb = new StringBuilder();
-                    if (this.pdd.prevewDialogDataKey1 != null) {
-                        sb.append(", trId1=");
-                        sb.append(this.pdd.prevewDialogDataKey1.origTxId);
-                    }
-                    if (this.pdd.prevewDialogDataKey2 != null) {
-                        sb.append(", trId2=");
-                        sb.append(this.pdd.prevewDialogDataKey2.origTxId);
-                    }
-// logger.error("Dialog closed by a timeout" + sb.toString() + " " + i1 + "->" + i2);
-                }
+//                provider.removePreviewDialog(pdd);
+//
+//                if (logger.isEnabledFor(Level.ERROR)) {
+//                    StringBuilder sb = new StringBuilder();
+//                    if (this.pdd.prevewDialogDataKey1 != null) {
+//                        sb.append(", trId1=");
+// sb.append(this.pdd.prevewDialogDataKey1.origTxId);
+//                    }
+//                    if (this.pdd.prevewDialogDataKey2 != null) {
+//                        sb.append(", trId2=");
+// sb.append(this.pdd.prevewDialogDataKey2.origTxId);
+//                    }
+//                }
             } finally {
                 dialogLock.unlock();
             }
=======================================
--- /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/TCAPProviderImpl.java Tue Jun 25 06:42:45 2013 +++ /tcap/tcap-impl/src/main/java/org/mobicents/protocols/ss7/tcap/TCAPProviderImpl.java Mon Jul 1 11:19:33 2013
@@ -864,7 +864,7 @@
         }
     }

- private Dialog getPreviewDialog(PrevewDialogDataKey ky1, PrevewDialogDataKey ky2, SccpAddress localAddress, + protected Dialog getPreviewDialog(PrevewDialogDataKey ky1, PrevewDialogDataKey ky2, SccpAddress localAddress,
             SccpAddress remoteAddress, int seqControl) {
         synchronized (this.dialogPreviewList) {
             PrevewDialogData pdd = this.dialogPreviewList.get(ky1);
=======================================
--- /tcap/tcap-impl/src/test/java/org/mobicents/protocols/ss7/tcap/PreviewModeFunctionalTest.java Mon May 20 13:09:00 2013 +++ /tcap/tcap-impl/src/test/java/org/mobicents/protocols/ss7/tcap/PreviewModeFunctionalTest.java Mon Jul 1 11:19:33 2013
@@ -439,6 +439,10 @@
         expectedEvents.add(te);
te = TestEvent.createReceivedEvent(EventType.Invoke, null, 1, stamp);
         expectedEvents.add(te);
+ te = TestEvent.createReceivedEvent(EventType.DialogTimeout, null, 2, stamp + 2000);
+        expectedEvents.add(te);
+ te = TestEvent.createReceivedEvent(EventType.DialogRelease, null, 3, stamp + 2000);
+        expectedEvents.add(te);

         this.tcapStack1.setInvokeTimeout(1000);
         this.tcapStack1.setDialogIdleTimeout(2000);

==============================================================================
Revision: f46cf0811cb4
Author:   Sergey Vetyutnev <[email protected]>
Date:     Mon Jul  1 11:26:56 2013
Log:      Merge remote-tracking branch 'origin/cap35'
http://code.google.com/p/jss7/source/detail?r=f46cf0811cb4


--

--- 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