summaryrefslogtreecommitdiff
path: root/CIAO/ciao/Servants
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2010-10-19 18:03:07 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2010-10-19 18:03:07 +0000
commitfa3b766166449ca082b04269b42ad083a28c099b (patch)
tree3eff40a5bbf4adf4c67bb0a96d263ce42bfab6df /CIAO/ciao/Servants
parent1809268c708388ea85e09df5033cee8c24a89faa (diff)
downloadATCD-fa3b766166449ca082b04269b42ad083a28c099b.tar.gz
Tue Oct 19 17:58:37 UTC 2010 Johnny Willemsen <jwillemsen@remedy.nl>
* ciao/Servants/Port_Activator_T.h: * ciao/Servants/Port_Activator_T.cpp: Fixed memory leaks * ciao/Servants/Session/Servant_Impl_T.h: Layout changes
Diffstat (limited to 'CIAO/ciao/Servants')
-rw-r--r--CIAO/ciao/Servants/Port_Activator_T.cpp23
-rw-r--r--CIAO/ciao/Servants/Port_Activator_T.h8
-rw-r--r--CIAO/ciao/Servants/Session/Servant_Impl_T.h10
3 files changed, 20 insertions, 21 deletions
diff --git a/CIAO/ciao/Servants/Port_Activator_T.cpp b/CIAO/ciao/Servants/Port_Activator_T.cpp
index d52b337b72a..8ef854f9e46 100644
--- a/CIAO/ciao/Servants/Port_Activator_T.cpp
+++ b/CIAO/ciao/Servants/Port_Activator_T.cpp
@@ -18,12 +18,12 @@ namespace CIAO
const char *oid,
const char *name,
Port_Activator_Types::Type t,
- EXEC *e,
- CONTEXT *c,
+ typename EXEC::ptr_type e,
+ typename CONTEXT::ptr_type c,
COMP_SERV *cc)
: Port_Activator_i (oid, name, t)
- , executor_ (e)
- , context_ (c)
+ , executor_ (EXEC::_duplicate (e))
+ , context_ (CONTEXT::_duplicate (c))
, comp_serv_ (cc)
{
}
@@ -34,8 +34,7 @@ namespace CIAO
typename COMP_SERV>
void
Port_Activator_T<SERV, EXEC, CONTEXT, COMP_SERV>::deactivate (
- PortableServer::Servant servant,
- CORBA::Boolean)
+ PortableServer::Servant servant, CORBA::Boolean)
{
SERVANT *s = dynamic_cast<SERVANT *> (servant);
if (s)
@@ -58,9 +57,9 @@ namespace CIAO
// side.
if (ACE_OS::strcmp (this->oid_.in (), str.in ()) == 0)
{
- if (this->executor_ == 0 && this->t_ == Port_Activator_Types::FACET)
+ if (EXEC::is_nil (this->executor_.in ()) && this->t_ == Port_Activator_Types::FACET)
{
- CORBA::Object_var tmp =
+ ::CORBA::Object_var tmp =
this->comp_serv_->get_facet_executor (this->name_.in ());
this->executor_ = EXEC::_narrow (tmp.in ());
@@ -69,14 +68,14 @@ namespace CIAO
SERVANT *s = 0;
ACE_NEW_THROW_EX (s,
- SERVANT (this->executor_,
- this->context_),
- CORBA::NO_MEMORY ());
+ SERVANT (this->executor_.in (),
+ this->context_.in ()),
+ ::CORBA::NO_MEMORY ());
return s;
}
- throw CORBA::OBJECT_NOT_EXIST ();
+ throw ::CORBA::OBJECT_NOT_EXIST ();
}
}
diff --git a/CIAO/ciao/Servants/Port_Activator_T.h b/CIAO/ciao/Servants/Port_Activator_T.h
index a71ab29798c..461dffc6feb 100644
--- a/CIAO/ciao/Servants/Port_Activator_T.h
+++ b/CIAO/ciao/Servants/Port_Activator_T.h
@@ -47,8 +47,8 @@ namespace CIAO
Port_Activator_T (const char *oid,
const char *name,
Port_Activator_Types::Type t,
- EXEC *e,
- CONTEXT *c,
+ typename EXEC::ptr_type e,
+ typename CONTEXT::ptr_type c,
COMP_SERV *cs);
/// Template method from the base class, please see the base class
@@ -61,10 +61,10 @@ namespace CIAO
private:
/// The executor
- EXEC *executor_;
+ typename EXEC::_var_type executor_;
/// Context classes
- CONTEXT *context_;
+ typename CONTEXT::_var_type context_;
/// Component servant which created @c this
COMP_SERV *comp_serv_;
diff --git a/CIAO/ciao/Servants/Session/Servant_Impl_T.h b/CIAO/ciao/Servants/Session/Servant_Impl_T.h
index 006058e4659..7b03a64774e 100644
--- a/CIAO/ciao/Servants/Session/Servant_Impl_T.h
+++ b/CIAO/ciao/Servants/Session/Servant_Impl_T.h
@@ -45,10 +45,10 @@ namespace CIAO
{
public:
Session_Servant_Impl (EXEC * exe,
- Components::CCMHome_ptr home,
- const char * ins_name,
- Home_Servant_Impl_Base *home_servant,
- ::CIAO::Session_Container_ptr c);
+ Components::CCMHome_ptr home,
+ const char * ins_name,
+ Home_Servant_Impl_Base *home_servant,
+ ::CIAO::Session_Container_ptr c);
virtual ~Session_Servant_Impl (void);
@@ -78,7 +78,7 @@ namespace CIAO
typename EXEC::_var_type executor_;
/// Initialized in this constructor.
- CONTEXT * context_;
+ CONTEXT* context_;
const char * ins_name_;
};