summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-07 04:31:40 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-07 04:31:40 +0000
commit12e07f6e18dc905b9e6805a29df77398c5d51868 (patch)
tree1daf62100186572a77a902f0b767e2e580992bb6
parent476239ca290c5db9b14754f6cd2cb05d699b6c2e (diff)
downloadATCD-12e07f6e18dc905b9e6805a29df77398c5d51868.tar.gz
Sun Jun 06 23:17:05 1999 Irfan Pyarali <irfan@cs.wustl.edu>
-rw-r--r--README1
-rw-r--r--TAO/ChangeLog-99c19
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp74
-rw-r--r--TAO/tao/GIOP.cpp2
-rw-r--r--TAO/tao/POAC.cpp6
-rw-r--r--TAO/tao/POAC.h2
-rw-r--r--TAO/tao/POAC.i4
7 files changed, 72 insertions, 36 deletions
diff --git a/README b/README
index 79d44b40678..ef94667040d 100644
--- a/README
+++ b/README
@@ -857,6 +857,7 @@ Tom Bradley <thomas.bradley@maisel-gw.enst-bretagne.fr>
Shaun Ohagan <jk13@dial.pipex.com>
Dale/Christine Wood <dale_wood@Mitel.COM>
Robert Flanders <rdfa@eci.esys.com>
+Gul Onural <Gul_Onural@Mitel.COM>
I would particularly like to thank Paul Stephenson, who worked with me
at Ericsson and is now at ObjectSpace. Paul devised the recursive
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 82e92c0a185..0b9abae0632 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,20 @@
+Sun Jun 06 23:17:05 1999 Irfan Pyarali <irfan@cs.wustl.edu>
+
+ * tao/POAC: Changed <InvalidPolicy::slot> back to
+ <InvalidPolicy::index>. We can't rename this since it is
+ specified in the CORBA spec.
+
+ * tao/GIOP.cpp (process_server_locate): Initialized <status> to
+ TAO_GIOP_UNKNOWN_OBJECT. This is a safe initial value and will
+ prevent the "might be used uninitialized in this function"
+ warning.
+
+ * orbsvcs/orbsvcs/Naming/Naming_Utils.cpp (init): Fixed the method
+ such that when we are not looking for an existing Naming Service
+ and we are simply become one, we don't print extra erroneous
+ debug messages. Thanks to Gul Onural <Gul_Onural@Mitel.COM> for
+ pointing this out.
+
Sun Jun 6 22:09:39 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* orbsvcs/orbsvcs/AV/sfp.cpp:
@@ -126,7 +143,7 @@ Sun Jun 6 14:04:43 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
* tao/GIOP.cpp:
* tao/Wait_Strategy.cpp:
* tao/GIOP.cpp: Addesses the @@ Carlos comments.
-
+
* tao/IOP.pidl: Completed the IOP module definition
Sun Jun 6 13:32:25 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp
index a1fd0ede19b..9349e2cd726 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.cpp
@@ -49,17 +49,9 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb,
int resolve_for_existing_naming_service,
LPCTSTR persistence_location)
{
- CORBA::Object_var naming_obj;
-
- if (resolve_for_existing_naming_service)
- naming_obj = orb->resolve_initial_references ("NameService",
- timeout);
-
- if (CORBA::is_nil (naming_obj.in ()))
+ // Don't look for a Naming Service; become one.
+ if (!resolve_for_existing_naming_service)
{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "\nNameService not resolved, so we'll become a NameService\n"));
return this->init_new_naming (orb,
poa,
persistence_location,
@@ -67,30 +59,56 @@ TAO_Naming_Server::init (CORBA::ORB_ptr orb,
}
else
{
- if (TAO_debug_level > 0)
- ACE_DEBUG ((LM_DEBUG,
- "\nNameService found!\n"));
+ //
+ // Try to find an existing Naming Service.
+ //
+ CORBA::Object_var naming_obj =
+ orb->resolve_initial_references ("NameService",
+ timeout);
- ACE_DECLARE_NEW_CORBA_ENV;
- ACE_TRY
+ // No luck in finding an existing Naming Service.
+ if (CORBA::is_nil (naming_obj.in ()))
{
- this->naming_context_ =
- CosNaming::NamingContext::_narrow (naming_obj.in (),
- ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- this->naming_service_ior_ =
- orb->object_to_string (naming_obj.in (),
- ACE_TRY_ENV);
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "\nNameService not resolved, so we'll become a NameService\n"));
- ACE_TRY_CHECK;
+ // Become a Naming Service.
+ return this->init_new_naming (orb,
+ poa,
+ persistence_location,
+ context_size);
}
- ACE_CATCHANY
+ else
{
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Naming_Server::init");
+ //
+ // Success in finding a Naming Service.
+ //
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "\nNameService found!\n"));
+
+ ACE_DECLARE_NEW_CORBA_ENV;
+ ACE_TRY
+ {
+ this->naming_context_ =
+ CosNaming::NamingContext::_narrow (naming_obj.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ this->naming_service_ior_ =
+ orb->object_to_string (naming_obj.in (),
+ ACE_TRY_ENV);
+
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_Naming_Server::init");
+ }
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (-1);
}
- ACE_ENDTRY;
- ACE_CHECK_RETURN (-1);
}
return 0;
}
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp
index 8abe37cc107..0b1d42f1a83 100644
--- a/TAO/tao/GIOP.cpp
+++ b/TAO/tao/GIOP.cpp
@@ -1037,7 +1037,7 @@ TAO_GIOP::process_server_locate (TAO_Transport *transport,
// appropriate.
TAO_GIOP_LocateRequestHeader locateRequestHeader;
- TAO_GIOP_LocateStatusType status;
+ TAO_GIOP_LocateStatusType status = TAO_GIOP_UNKNOWN_OBJECT;
CORBA::Object_var forward_location_var;
ACE_TRY
diff --git a/TAO/tao/POAC.cpp b/TAO/tao/POAC.cpp
index 9e9f91fec88..2a77c6540b7 100644
--- a/TAO/tao/POAC.cpp
+++ b/TAO/tao/POAC.cpp
@@ -2047,7 +2047,7 @@ PortableServer::POA::InvalidPolicy::~InvalidPolicy (void)
PortableServer::POA::InvalidPolicy::InvalidPolicy (const PortableServer::POA::InvalidPolicy &_tao_excp)
: CORBA_UserException (_tao_excp._type ())
{
- this->slot = _tao_excp.slot;
+ this->index = _tao_excp.index;
}
// assignment operator
@@ -2055,7 +2055,7 @@ PortableServer::POA::InvalidPolicy&
PortableServer::POA::InvalidPolicy::operator= (const PortableServer::POA::InvalidPolicy &_tao_excp)
{
this->CORBA_UserException::operator= (_tao_excp);
- this->slot = _tao_excp.slot;
+ this->index = _tao_excp.index;
return *this;
}
@@ -2063,7 +2063,7 @@ PortableServer::POA::InvalidPolicy::InvalidPolicy(
CORBA::UShort _tao_index)
: CORBA_UserException (PortableServer::POA::_tc_InvalidPolicy)
{
- this->slot = _tao_index;
+ this->index = _tao_index;
}
void PortableServer::POA::InvalidPolicy::_raise (void)
diff --git a/TAO/tao/POAC.h b/TAO/tao/POAC.h
index 97ef856d8c5..4b2d7b7000c 100644
--- a/TAO/tao/POAC.h
+++ b/TAO/tao/POAC.h
@@ -1790,7 +1790,7 @@ TAO_NAMESPACE PortableServer{
CORBA::UShort _tao_index
);
- CORBA::UShort slot;
+ CORBA::UShort index;
// = TAO extension
static CORBA::Exception *_alloc (void);
diff --git a/TAO/tao/POAC.i b/TAO/tao/POAC.i
index 009f59e41dd..fc5d5f2b64b 100644
--- a/TAO/tao/POAC.i
+++ b/TAO/tao/POAC.i
@@ -3637,7 +3637,7 @@ ACE_INLINE CORBA::Boolean operator<< (TAO_OutputCDR &strm, const PortableServer:
if (strm << _tao_aggregate._id ())
{
// now marshal the members (if any)
- if ((strm << _tao_aggregate.slot))
+ if ((strm << _tao_aggregate.index))
return 1;
else
return 0;
@@ -3654,7 +3654,7 @@ ACE_INLINE CORBA::Boolean operator>> (TAO_InputCDR &strm, PortableServer::POA::I
(_tao_aggregate._is_a (_tao_repoID)))
{
// now marshal the members
- if ((strm >> _tao_aggregate.slot))
+ if ((strm >> _tao_aggregate.index))
return 1;
else
return 0;