[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/

damencho at dev.java.net damencho at dev.java.net
Mon Apr 23 10:18:56 CEST 2007


User: damencho
Date: 2007-04-23 08:18:56+0000
Modified:
   sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java
   sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java

Log:
 Msn recconect on connection failed.

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/
=============================================================================

File [changed]: EventManager.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/EventManager.java?r1=1.5&r2=1.6
Delta lines:  +3 -6
-------------------
--- EventManager.java	2007-04-19 14:56:42+0000	1.5
+++ EventManager.java	2007-04-23 08:18:53+0000	1.6
@@ -226,13 +226,10 @@
         {
             public void run()
             {
-                if(!connected)
+                if(!connected && msnProvider.isRegistered())
                 {
                     msnProvider.unregister(false);
-                    msnProvider.fireRegistrationStateChanged(
-                        msnProvider.getRegistrationState(),
-                        RegistrationState.CONNECTION_FAILED,
-                        RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, null);
+                    msnProvider.reconnect();
                 }
             }
         }, 20000);

File [changed]: ProtocolProviderServiceMsnImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/msn/ProtocolProviderServiceMsnImpl.java?r1=1.13&r2=1.14
Delta lines:  +17 -0
--------------------
--- ProtocolProviderServiceMsnImpl.java	2007-04-11 12:47:40+0000	1.13
+++ ProtocolProviderServiceMsnImpl.java	2007-04-23 08:18:53+0000	1.14
@@ -111,6 +111,23 @@
     }
 
     /**
+     * Reconnects if fails fire connection failed.
+     */
+    void reconnect()
+    {
+        try
+        {
+            connectAndLogin(authority);
+        } catch (OperationFailedException ex)
+        {
+            fireRegistrationStateChanged(
+                getRegistrationState(),
+                RegistrationState.CONNECTION_FAILED,
+                RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, null);
+        }
+    }
+
+    /**
      * Connects and logins to the server
      * @param authority SecurityAuthority
      * @throws XMPPException if we cannot connect to the server - network problem




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list