[ekiga/gnome-2-26] Fixed bug #577524 (locking in sip-endpoint.cpp)
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga/gnome-2-26] Fixed bug #577524 (locking in sip-endpoint.cpp)
- Date: Mon, 27 Apr 2009 12:30:14 -0400 (EDT)
commit c3c24c908d1a69672f39e8760bf2e071e1dfee53
Author: Julien Puydt <jpuydt src gnome org>
Date: Thu Apr 2 20:27:32 2009 +0000
Fixed bug #577524 (locking in sip-endpoint.cpp)
svn path=/trunk/; revision=7842
---
lib/engine/components/opal/sip-endpoint.cpp | 5 +++++
lib/engine/components/opal/sip-endpoint.h | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index f189376..48fcf4d 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -262,6 +262,7 @@ Opal::Sip::EndPoint::menu_builder_add_actions (const std::string& fullname,
void
Opal::Sip::EndPoint::fetch (const std::string _uri)
{
+ PWaitAndSignal mut(listsMutex);
std::string::size_type loc = _uri.find ("@", 0);
std::string domain;
@@ -289,6 +290,7 @@ Opal::Sip::EndPoint::fetch (const std::string _uri)
void
Opal::Sip::EndPoint::unfetch (const std::string uri)
{
+ PWaitAndSignal mut(listsMutex);
if (std::find (subscribed_uris.begin (), subscribed_uris.end (), uri) != subscribed_uris.end ()) {
Subscribe (SIPSubscribe::Presence, 0, PString (uri.c_str ()));
@@ -301,6 +303,7 @@ Opal::Sip::EndPoint::unfetch (const std::string uri)
void
Opal::Sip::EndPoint::publish (const Ekiga::PersonalDetails & details)
{
+ PWaitAndSignal mut(listsMutex);
std::string hostname = (const char *) PIPSocket::GetHostName ();
std::string presence = ((Ekiga::PersonalDetails &) (details)).get_presence ();
std::string status = ((Ekiga::PersonalDetails &) (details)).get_status ();
@@ -564,6 +567,7 @@ Opal::Sip::EndPoint::Register (const std::string username,
bool is_enabled,
unsigned timeout)
{
+ PWaitAndSignal mut(listsMutex);
PString _aor;
std::stringstream aor;
std::string host(host_);
@@ -603,6 +607,7 @@ void
Opal::Sip::EndPoint::OnRegistered (const PString & _aor,
bool was_registering)
{
+ PWaitAndSignal mut(listsMutex);
std::string aor = (const char *) _aor;
std::string::size_type found;
std::string::size_type loc = aor.find ("@", 0);
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index 0c864dd..f401f06 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -217,6 +217,7 @@ namespace Opal {
CallManager & manager;
+ PMutex listsMutex;
std::list<std::string> to_subscribe_uris; // List of uris to subscribe
std::list<std::string> subscribed_uris; // List of subscribed uris
std::list<std::string> aors; // List of registered aor
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]