ekiga r7822 - in trunk: . lib/engine/components/opal



Author: ededu
Date: Fri Mar 27 20:35:33 2009
New Revision: 7822
URL: http://svn.gnome.org/viewvc/ekiga?rev=7822&view=rev

Log:
On failed registration, do not show the unuseful RequestTerminated code to user.


Modified:
   trunk/ChangeLog
   trunk/lib/engine/components/opal/sip-endpoint.cpp

Modified: trunk/lib/engine/components/opal/sip-endpoint.cpp
==============================================================================
--- trunk/lib/engine/components/opal/sip-endpoint.cpp	(original)
+++ trunk/lib/engine/components/opal/sip-endpoint.cpp	Fri Mar 27 20:35:33 2009
@@ -713,7 +713,7 @@
     break;
 
   case SIP_PDU::Failure_Forbidden:
-    info = _("Forbidden");
+    info = _("Forbidden, please check that username and password are correct");
     break;
 
   case SIP_PDU::Failure_RequestTimeout:
@@ -909,13 +909,18 @@
   /* Signal the SIP Endpoint */
   SIPEndPoint::OnRegistrationFailed (strm.str ().c_str (), r, wasRegistering);
 
-  /* Signal */
-  Opal::Account *account = bank->find_account (strm.str ());
-  if (account)
-    Ekiga::Runtime::run_in_main (sigc::bind (sigc::ptr_fun(registration_event_in_main),
+  /* opal adds a RequestTerminated, and this should not be shown to user,
+   * as a sip code has already been scheduled to be shown
+   */
+  if (r != SIP_PDU::Failure_RequestTerminated) {
+    /* Signal */
+    Opal::Account *account = bank->find_account (strm.str ());
+    if (account)
+      Ekiga::Runtime::run_in_main (sigc::bind (sigc::ptr_fun(registration_event_in_main),
 				      account->registration_event.make_slot (),
 				      wasRegistering ? Ekiga::AccountCore::RegistrationFailed : Ekiga::AccountCore::UnregistrationFailed,
 				      info));
+  }
 }
 
 



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