[Telepathy-commits] [telepathy-mission-control/master] Change reasons for reconnection

Alberto Mardegan alberto.mardegan at nokia.com
Fri Jan 30 04:33:36 PST 2009


Attempt reconnection only when the disconnect reason gives some hopes for
retrial.
---
 src/mcd-connection.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 454a618..b61bb84 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -1134,7 +1134,9 @@ static void proxy_destroyed (DBusGProxy *tp_conn, guint domain, gint code,
     }
 
     if (priv->auto_reconnect &&
-        priv->abort_reason != TP_CONNECTION_STATUS_REASON_REQUESTED)
+        (priv->abort_reason == TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED ||
+         priv->abort_reason == TP_CONNECTION_STATUS_REASON_NETWORK_ERROR ||
+         priv->abort_reason == TP_CONNECTION_STATUS_REASON_NAME_IN_USE))
     {
         /* we were disconnected by a network error or by a connection manager
          * crash (in the latter case, we get NoneSpecified as a reason): don't
-- 
1.5.6.5




More information about the telepathy-commits mailing list