ekiga r7362 - in trunk: . src/endpoints
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7362 - in trunk: . src/endpoints
- Date: Sun, 16 Nov 2008 09:30:17 +0000 (UTC)
Author: dsandras
Date: Sun Nov 16 09:30:17 2008
New Revision: 7362
URL: http://svn.gnome.org/viewvc/ekiga?rev=7362&view=rev
Log:
Fixed bug in previous commit. The presence information was not modified if
the presence itself remained the same.
Modified:
trunk/ChangeLog
trunk/src/endpoints/sip-endpoint.cpp
trunk/src/endpoints/sip-endpoint.h
Modified: trunk/src/endpoints/sip-endpoint.cpp
==============================================================================
--- trunk/src/endpoints/sip-endpoint.cpp (original)
+++ trunk/src/endpoints/sip-endpoint.cpp Sun Nov 16 09:30:17 2008
@@ -1079,7 +1079,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 ())
@@ -1089,8 +1090,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: trunk/src/endpoints/sip-endpoint.h
==============================================================================
--- trunk/src/endpoints/sip-endpoint.h (original)
+++ trunk/src/endpoints/sip-endpoint.h Sun Nov 16 09:30:17 2008
@@ -194,7 +194,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]