[ekiga] Opal: Fixed UDP fallback registration.



commit d99923d8be7a17a8f4654937d6a6ba0e5d75d746
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Apr 19 13:25:11 2015 +0200

    Opal: Fixed UDP fallback registration.
    
    The problem is that the initial SIPHandler used to try registering in
    TCP mode was still being retried every 30 seconds. And with each
    failure, came a new UDP SIPHandler.

 .../components/opal/process/sip-endpoint.cpp       |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/lib/engine/components/opal/process/sip-endpoint.cpp 
b/lib/engine/components/opal/process/sip-endpoint.cpp
index 61ac0f7..2f0553a 100644
--- a/lib/engine/components/opal/process/sip-endpoint.cpp
+++ b/lib/engine/components/opal/process/sip-endpoint.cpp
@@ -81,16 +81,8 @@ namespace Opal {
           // Register the given aor to the given registrar
           ep.Register (params, _aor);
         }
-        else {
-          PString aor = "sip:" + account.get_username () + "@" + account.get_host ();
-          if (!ep.IsRegistered (aor))
-            aor += ";transport=tcp";
-
-          if (!ep.IsRegistered (aor))
-            return;
-
-          ep.Unregister (aor);
-        }
+        else
+          ep.Unregister (account.get_full_uri (""));
       }
 
   private:
@@ -297,6 +289,9 @@ Opal::Sip::EndPoint::OnRegistrationStatus (const RegistrationStatus & status)
       params.m_expire = status.m_handler->GetExpire ();
       params.m_minRetryTime = PMaxTimeInterval;  // use default value
       params.m_maxRetryTime = PMaxTimeInterval;  // use default value
+      if (status.m_handler->ShutDown ())
+        activeSIPHandlers.Remove (status.m_handler); // Make sure the TCP handler is deleted
+                                                     // or it will be retried indefinitely.
       SIPEndPoint::Register (params, _aor);
       return;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]