[ekiga] Fixed the Opal::Sip::EndPoint::update_bank method



commit b047dd3c07dac626d49d0202f51924eb285fbaa2
Author: Julien Puydt <jpuydt free fr>
Date:   Mon Jan 28 09:25:24 2013 +0100

    Fixed the Opal::Sip::EndPoint::update_bank method

 lib/engine/components/opal/opal-main.cpp    |    2 +-
 lib/engine/components/opal/sip-endpoint.cpp |   13 ++++++-------
 lib/engine/components/opal/sip-endpoint.h   |    3 +--
 3 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-main.cpp b/lib/engine/components/opal/opal-main.cpp
index 14388a5..e05c33e 100644
--- a/lib/engine/components/opal/opal-main.cpp
+++ b/lib/engine/components/opal/opal-main.cpp
@@ -137,7 +137,7 @@ struct OPALSpark: public Ekiga::Spark
       boost::shared_ptr<Bank> bank (new Bank (core));
       account_core->add_bank (bank);
       core.add (bank);
-      sip_manager->update_bank ();
+      sip_manager->update_bank (bank);
       call_manager->ready.connect (boost::bind (&Opal::Bank::call_manager_ready, &*bank));
       presence_core->add_presence_publisher (bank);
       presence_core->add_presence_fetcher (bank);
diff --git a/lib/engine/components/opal/sip-endpoint.cpp b/lib/engine/components/opal/sip-endpoint.cpp
index de06234..ce6df39 100644
--- a/lib/engine/components/opal/sip-endpoint.cpp
+++ b/lib/engine/components/opal/sip-endpoint.cpp
@@ -113,11 +113,10 @@ namespace Opal {
 
 /* The class */
 Opal::Sip::EndPoint::EndPoint (Opal::CallManager & _manager,
-                               Ekiga::ServiceCore & _core,
-                               unsigned _listen_port)
-    :   SIPEndPoint (_manager),
-	manager (_manager),
-	core (_core)
+                               Ekiga::ServiceCore& core,
+                               unsigned _listen_port):
+  SIPEndPoint (_manager),
+  manager (_manager)
 {
   boost::shared_ptr<Ekiga::ChatCore> chat_core = core.get<Ekiga::ChatCore> ("chat-core");
 
@@ -1026,9 +1025,9 @@ Opal::Sip::EndPoint::mwi_received_in_main (const std::string aor,
 }
 
 void
-Opal::Sip::EndPoint::update_bank ()
+Opal::Sip::EndPoint::update_bank (boost::shared_ptr<Opal::Bank> _bank)
 {
-  bank = core.get<Opal::Bank> ("opal-account-store");
+  bank = _bank;
   bank->account_added.connect (boost::bind (&Opal::Sip::EndPoint::account_added, this, _1));
   bank->account_updated.connect (boost::bind (&Opal::Sip::EndPoint::account_updated_or_removed, this, _1));
   bank->account_removed.connect (boost::bind (&Opal::Sip::EndPoint::account_updated_or_removed, this, _1));
diff --git a/lib/engine/components/opal/sip-endpoint.h b/lib/engine/components/opal/sip-endpoint.h
index 71e43b3..fe54800 100644
--- a/lib/engine/components/opal/sip-endpoint.h
+++ b/lib/engine/components/opal/sip-endpoint.h
@@ -134,7 +134,7 @@ namespace Opal {
       static std::string get_aor_domain (const std::string & aor);
 
       /* FIXME: doesn't look 100% right */
-      void update_bank ();
+      void update_bank (boost::shared_ptr<Opal::Bank> _bank);
 
       /* OPAL Methods */
       void Register (const std::string username,
@@ -197,7 +197,6 @@ namespace Opal {
       std::map<std::string, std::string> accounts;
 
       CallManager & manager;
-      Ekiga::ServiceCore & core;
 
       std::map<std::string, PString> publications;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]