ekiga r6812 - in trunk: . lib/engine/account/skel src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6812 - in trunk: . lib/engine/account/skel src/endpoints
- Date: Wed, 3 Sep 2008 21:02:18 +0000 (UTC)
Author: dsandras
Date: Wed Sep 3 21:02:18 2008
New Revision: 6812
URL: http://svn.gnome.org/viewvc/ekiga?rev=6812&view=rev
Log:
Prevent registering when not unregistered and prevent unregistering
when not registered. More logical behavior in case of failure.
Modified:
trunk/ChangeLog
trunk/lib/engine/account/skel/account-core.h
trunk/src/endpoints/h323-endpoint.cpp
trunk/src/endpoints/sip-endpoint.cpp
Modified: trunk/lib/engine/account/skel/account-core.h
==============================================================================
--- trunk/lib/engine/account/skel/account-core.h (original)
+++ trunk/lib/engine/account/skel/account-core.h Wed Sep 3 21:02:18 2008
@@ -259,7 +259,7 @@
Ekiga::AccountSubscriberImpl<T> *subscriber = dynamic_cast<Ekiga::AccountSubscriberImpl<T> *> (*iter);
if (subscriber)
- if (subscriber->subscribe (account))
+ if (subscriber->unsubscribe (account))
return true;
}
Modified: trunk/src/endpoints/h323-endpoint.cpp
==============================================================================
--- trunk/src/endpoints/h323-endpoint.cpp (original)
+++ trunk/src/endpoints/h323-endpoint.cpp Wed Sep 3 21:02:18 2008
@@ -260,7 +260,7 @@
bool Opal::H323::EndPoint::subscribe (const Opal::Account & account)
{
- if (account.get_protocol_name () != "H323")
+ if (account.get_protocol_name () != "H323" || account.is_active ())
return false;
new subscriber (account, *this);
@@ -271,7 +271,7 @@
bool Opal::H323::EndPoint::unsubscribe (const Opal::Account & account)
{
- if (account.get_protocol_name () != "H323")
+ if (account.get_protocol_name () != "H323" || !account.is_active ())
return false;
new subscriber (account, *this);
Modified: trunk/src/endpoints/sip-endpoint.cpp
==============================================================================
--- trunk/src/endpoints/sip-endpoint.cpp (original)
+++ trunk/src/endpoints/sip-endpoint.cpp Wed Sep 3 21:02:18 2008
@@ -325,7 +325,7 @@
// We are registered yet
if (std::find (domains.begin (), domains.end (), domain) != domains.end ()) {
- Subscribe (SIPSubscribe::Presence, 1800, PString (_uri.c_str ()));
+ Subscribe (SIPSubscribe::Presence, 500, PString (_uri.c_str ()));
subscribed_uris.push_back (_uri);
}
else {
@@ -553,7 +553,7 @@
bool Opal::Sip::EndPoint::subscribe (const Opal::Account & account)
{
- if (account.get_protocol_name () != "SIP")
+ if (account.get_protocol_name () != "SIP" || account.is_active ())
return false;
new subscriber (account, *this);
@@ -563,7 +563,7 @@
bool Opal::Sip::EndPoint::unsubscribe (const Opal::Account & account)
{
- if (account.get_protocol_name () != "SIP")
+ if (account.get_protocol_name () != "SIP" || !account.is_active ())
return false;
new subscriber (account, *this);
@@ -664,7 +664,7 @@
found = (*iter).find (server, 0);
if (found != string::npos) {
- Subscribe (SIPSubscribe::Presence, 0, PString ((*iter).c_str ()));
+ Unsubscribe (SIPSubscribe::Presence, PString ((*iter).c_str ()));
to_subscribe_uris.push_back (*iter);
subscribed_uris.remove (*iter++);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]