[ekiga] Made the opal accounts only signal failed registrations on the first failure ; further retries won't
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Made the opal accounts only signal failed registrations on the first failure ; further retries won't
- Date: Sat, 24 Sep 2011 12:48:46 +0000 (UTC)
commit 804e7a10dff32003d2059b56e185551d9b7e8859
Author: Julien Puydt <jpuydt newton localdomain>
Date: Sat Sep 24 14:46:57 2011 +0200
Made the opal accounts only signal failed registrations on the first failure ; further retries won't be repeated
This mostly fixes bug #548084, but not quite, since I didn't want to modify
strings to say we were retrying.
lib/engine/components/opal/opal-account.cpp | 10 +++++++++-
lib/engine/components/opal/opal-account.h | 2 ++
2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 04e58e4..bc0f198 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -68,6 +68,7 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
state = Unregistered;
status = _("Unregistered");
message_waiting_number = 0;
+ failed_registration_already_notified = false;
int i = 0;
char *pch = strtok ((char *) account.c_str (), "|");
@@ -168,6 +169,7 @@ Opal::Account::Account (Ekiga::ServiceCore & _core,
password = _password;
timeout = _timeout;
type = t;
+ failed_registration_already_notified = false;
setup_presentity ();
@@ -557,6 +559,7 @@ Opal::Account::handle_registration_event (RegistrationState state_,
if (presence_core && personal_details)
presence_core->publish (personal_details);
state = state_;
+ failed_registration_already_notified = false;
updated ();
}
break;
@@ -566,6 +569,8 @@ Opal::Account::handle_registration_event (RegistrationState state_,
// Translators: this is a state, not an action, i.e. it should be read as
// "(you are) unregistered", and not as "(you have been) unregistered"
status = _("Unregistered");
+ failed_registration_already_notified = false;
+
updated ();
/* delay destruction of this account until the
unsubscriber thread has called back */
@@ -576,6 +581,7 @@ Opal::Account::handle_registration_event (RegistrationState state_,
case UnregistrationFailed:
status = _("Could not unregister");
+ failed_registration_already_notified = false;
if (!info.empty ())
status = status + " (" + info + ")";
updated ();
@@ -603,7 +609,9 @@ Opal::Account::handle_registration_event (RegistrationState state_,
status = _("Could not register");
if (!info.empty ())
status = status + " (" + info + ")";
- updated ();
+ if ( !failed_registration_already_notified)
+ updated ();
+ failed_registration_already_notified = true;
break;
default:
break;
diff --git a/lib/engine/components/opal/opal-account.h b/lib/engine/components/opal/opal-account.h
index 3d3a9fb..5faaf8c 100644
--- a/lib/engine/components/opal/opal-account.h
+++ b/lib/engine/components/opal/opal-account.h
@@ -192,6 +192,8 @@ private:
std::string password;
Type type;
+ mutable bool failed_registration_already_notified;
+
PSafePtr<OpalPresentity> presentity;
void setup_presentity ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]