summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-10-18 13:55:01 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-10-18 13:55:01 +0000
commit4ca733d66f01d98d6bb8a8e8a5f82036cdddb6af (patch)
treea08f00137ea2222f98662cbc750ef46f80c8be03
parent5d9cebc16139006d7deb04eb9db16cb43a29e79f (diff)
downloadATCD-4ca733d66f01d98d6bb8a8e8a5f82036cdddb6af.tar.gz
Mon Oct 18 13:49:56 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/Contexts/Session/Session_Context_T.h: * ciao/Contexts/Session/Session_Context_T.cpp: Don't cache the component * ciao/Deployment/Handlers/Container_Handler.cpp: Fixed some leaks * connectors/dds4ccm/impl/DomainParticipantManager.cpp: Added a debug statement to show when we are finalizing dds
-rw-r--r--CIAO/ChangeLog12
-rw-r--r--CIAO/ciao/Contexts/Session/Session_Context_T.cpp35
-rw-r--r--CIAO/ciao/Contexts/Session/Session_Context_T.h1
-rw-r--r--CIAO/ciao/Deployment/Handlers/Container_Handler.cpp15
-rw-r--r--CIAO/connectors/dds4ccm/impl/DomainParticipantManager.cpp4
5 files changed, 36 insertions, 31 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index ed740b7e74c..f4fa2881c29 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,15 @@
+Mon Oct 18 13:49:56 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * ciao/Contexts/Session/Session_Context_T.h:
+ * ciao/Contexts/Session/Session_Context_T.cpp:
+ Don't cache the component
+
+ * ciao/Deployment/Handlers/Container_Handler.cpp:
+ Fixed some leaks
+
+ * connectors/dds4ccm/impl/DomainParticipantManager.cpp:
+ Added a debug statement to show when we are finalizing dds
+
Mon Oct 18 13:49:28 UTC 2010 Marcel Smit <msmit@remedy.nl>
* MPC/config/dds4ccm_impl.mpb:
diff --git a/CIAO/ciao/Contexts/Session/Session_Context_T.cpp b/CIAO/ciao/Contexts/Session/Session_Context_T.cpp
index d620adf8af0..36d5c7914ab 100644
--- a/CIAO/ciao/Contexts/Session/Session_Context_T.cpp
+++ b/CIAO/ciao/Contexts/Session/Session_Context_T.cpp
@@ -28,28 +28,25 @@ namespace CIAO
::CORBA::Object_ptr
Session_Context_Impl<BASE_CTX, COMP>::get_CCM_object (void)
{
- if (::CORBA::is_nil (this->component_.in ()))
+ ::CORBA::Object_var obj;
+
+ try
+ {
+ obj = this->container_->get_objref (this->servant_);
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught Exception\n");
+ }
+
+ typename COMP::_var_type component = COMP::_narrow (obj.in ());
+
+ if (::CORBA::is_nil (component.in ()))
{
- ::CORBA::Object_var obj;
-
- try
- {
- obj = this->container_->get_objref (this->servant_);
- }
- catch (const CORBA::Exception& ex)
- {
- ex._tao_print_exception ("Caught Exception\n");
- }
-
- this->component_ = COMP::_narrow (obj.in ());
-
- if (::CORBA::is_nil (this->component_.in ()))
- {
- throw ::CORBA::INTERNAL ();
- }
+ throw ::CORBA::INTERNAL ();
}
- return COMP::_duplicate (this->component_.in ());
+ return component._retn ();
}
}
diff --git a/CIAO/ciao/Contexts/Session/Session_Context_T.h b/CIAO/ciao/Contexts/Session/Session_Context_T.h
index 01d4967308a..6896903ccc2 100644
--- a/CIAO/ciao/Contexts/Session/Session_Context_T.h
+++ b/CIAO/ciao/Contexts/Session/Session_Context_T.h
@@ -65,7 +65,6 @@ namespace CIAO
private:
PortableServer::Servant servant_;
- typename COMP::_var_type component_;
};
}
diff --git a/CIAO/ciao/Deployment/Handlers/Container_Handler.cpp b/CIAO/ciao/Deployment/Handlers/Container_Handler.cpp
index 496b91703b6..b221c14f39f 100644
--- a/CIAO/ciao/Deployment/Handlers/Container_Handler.cpp
+++ b/CIAO/ciao/Deployment/Handlers/Container_Handler.cpp
@@ -85,16 +85,12 @@ namespace CIAO
{
CIAO_TRACE ("Container_Handler_i::install_instance");
- ::CORBA::Any_ptr outref;
- ACE_NEW_THROW_EX (outref,
+ ACE_NEW_THROW_EX (instance_reference,
::CORBA::Any (),
CORBA::NO_MEMORY ());
- instance_reference = outref;
-
CIAO::Session_Container *cont (0);
const char *name (plan.instance[instanceRef].name.in ());
- CORBA::PolicyList policies (0);
CIAO_DEBUG (6, (LM_DEBUG, CLINFO
"Container_Handler_i::install_instance - "
@@ -104,24 +100,21 @@ namespace CIAO
CIAO::Session_Container_i (this->orb_,
this->poa_),
CORBA::NO_MEMORY ());
+ CIAO::Container_var container_ref (cont);
CIAO_DEBUG (8, (LM_DEBUG, CLINFO
"Container_Handler_i::install_instance - "
"Container <%C> successfully created\n",
name));
- cont->init (name);
+ container_ref->init (name);
CIAO_DEBUG (8, (LM_DEBUG, CLINFO
"Container_Handler_i::install_instance - "
"Container <%C> successfully initialized\n",
name));
- CIAO::Container_var container_ref (cont);
-
- DEPLOYMENT_STATE::instance ()->add_container (name, cont);
-
- (*outref) <<= container_ref;
+ DEPLOYMENT_STATE::instance ()->add_container (name, container_ref.in ());
*instance_reference <<= container_ref;
}
diff --git a/CIAO/connectors/dds4ccm/impl/DomainParticipantManager.cpp b/CIAO/connectors/dds4ccm/impl/DomainParticipantManager.cpp
index 03c943654f9..71d41ebca6b 100644
--- a/CIAO/connectors/dds4ccm/impl/DomainParticipantManager.cpp
+++ b/CIAO/connectors/dds4ccm/impl/DomainParticipantManager.cpp
@@ -121,6 +121,10 @@ namespace CIAO
{
DDS4CCM_TRACE ("DomainParticipantManager::~DomainParticipantManager");
+ DDS4CCM_DEBUG (DDS4CCM_LOG_LEVEL_ACTION, (LM_DEBUG, CLINFO
+ "DomainParticipantManager::~DomainParticipantManager - "
+ "Finalizing DDS\n"));
+
DDSDomainParticipantFactory::finalize_instance ();
}