[ekiga] SIP: Fixed account unregistration.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] SIP: Fixed account unregistration.
- Date: Sun, 11 Jan 2015 14:15:16 +0000 (UTC)
commit bdc440425178b256d2c3f4e7ef29f70dbc977c79
Author: Damien Sandras <dsandras seconix com>
Date: Sun Jan 11 14:39:40 2015 +0100
SIP: Fixed account unregistration.
Unsubscribing is now correctly done.
lib/engine/components/opal/opal-account.cpp | 28 +++++++++++++-------------
1 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index 8bc9118..3f3f87d 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -516,17 +516,6 @@ Opal::Account::disable ()
{
xmlSetProp (node, BAD_CAST "enabled", BAD_CAST "false");
- if (presentity) {
-
- for (Ekiga::RefLister< Presentity >::iterator iter = Ekiga::RefLister< Presentity >::begin ();
- iter != Ekiga::RefLister< Presentity >::end ();
- ++iter) {
-
- (*iter)->set_presence ("unknown");
- (*iter)->set_status ("");
- }
- }
-
/* Actual unregistration code */
switch (type) {
case Account::H323:
@@ -536,6 +525,20 @@ Opal::Account::disable ()
case Account::DiamondCard:
case Account::Ekiga:
default:
+ if (presentity) {
+
+ for (Ekiga::RefLister< Presentity >::iterator iter = Ekiga::RefLister< Presentity >::begin ();
+ iter != Ekiga::RefLister< Presentity >::end ();
+ ++iter) {
+
+ (*iter)->set_presence ("unknown");
+ (*iter)->set_status ("");
+ }
+
+ if (type != Account::H323) {
+ sip_endpoint->Unsubscribe (SIPSubscribe::MessageSummary, get_transaction_aor (get_aor ()));
+ }
+ }
// Register the given aor to the given registrar
sip_endpoint->disable_account (*this);
break;
@@ -957,9 +960,6 @@ Opal::Account::handle_registration_event (Ekiga::Account::RegistrationState stat
if (presentity)
presentity->Close ();
- if (type != Account::H323) {
- sip_endpoint->Unsubscribe (SIPSubscribe::MessageSummary, get_transaction_aor (get_aor ()));
- }
Ekiga::Runtime::run_in_main (boost::ref (updated));
/* delay destruction of this account until the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]