ekiga r7363 - in branches/gnome-2-24: . src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7363 - in branches/gnome-2-24: . src/endpoints
- Date: Sun, 16 Nov 2008 09:32:07 +0000 (UTC)
Author: dsandras
Date: Sun Nov 16 09:32:07 2008
New Revision: 7363
URL: http://svn.gnome.org/viewvc/ekiga?rev=7363&view=rev
Log:
Fixed bug in previous commit. The presence information was not modified if
the presence itself remained the same.
Modified:
branches/gnome-2-24/ChangeLog
branches/gnome-2-24/src/endpoints/sip-endpoint.cpp
branches/gnome-2-24/src/endpoints/sip-endpoint.h
Modified: branches/gnome-2-24/src/endpoints/sip-endpoint.cpp
==============================================================================
--- branches/gnome-2-24/src/endpoints/sip-endpoint.cpp (original)
+++ branches/gnome-2-24/src/endpoints/sip-endpoint.cpp Sun Nov 16 09:32:07 2008
@@ -1112,7 +1112,8 @@
SIPURL sip_uri = SIPURL (user);
sip_uri.Sanitise (SIPURL::ExternalURI);
std::string _uri = sip_uri.AsString ();
- std::string old_presence = uri_presences[_uri];
+ std::string old_presence = uri_presences[_uri].first;
+ std::string old_status = uri_presences[_uri].second;
// If first notification, and no information, then we are offline
if (presence == "unknown" && old_presence.empty ())
@@ -1122,8 +1123,8 @@
// If presence is unknown (notification with empty body), and it is not the
// first notification, and we can conclude it is a ping back from the server
// to indicate the presence status did not change, hence we do nothing.
- if (presence != "unknown" && old_presence != presence) {
- uri_presences[_uri] = presence;
+ if (presence != "unknown" && (old_presence != presence || old_status != status)) {
+ uri_presences[_uri] = std::pair<std::string, std::string> (presence, status);
runtime->run_in_main (sigc::bind (sigc::ptr_fun (presence_status_in_main), this, _uri, presence, status));
}
}
Modified: branches/gnome-2-24/src/endpoints/sip-endpoint.h
==============================================================================
--- branches/gnome-2-24/src/endpoints/sip-endpoint.h (original)
+++ branches/gnome-2-24/src/endpoints/sip-endpoint.h Sun Nov 16 09:32:07 2008
@@ -197,7 +197,7 @@
SIP::Dialect *dialect;
- std::map<std::string, std::string> uri_presences;
+ std::map<std::string, std::pair <std::string, std::string> > uri_presences;
};
};
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]