summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-06 19:07:10 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-06 19:07:10 +0000
commite459d9e9dc09eaef24155467c9c0117d87f7c037 (patch)
treec28ea328650ea67f27a3f666eb3aebe43b9c0d56
parent6dd8ac29ddd5613ce5f78e64c779ec09464a7f41 (diff)
downloadATCD-e459d9e9dc09eaef24155467c9c0117d87f7c037.tar.gz
ChangeLogTag:Sun Jun 6 14:04:43 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c12
-rw-r--r--TAO/tao/Acceptor_Impl.h14
-rw-r--r--TAO/tao/Environment.cpp21
-rw-r--r--TAO/tao/GIOP.cpp55
-rw-r--r--TAO/tao/IOP.pidl63
-rw-r--r--TAO/tao/Wait_Strategy.cpp7
6 files changed, 135 insertions, 37 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 03aae1cad2a..553db9cf980 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,15 @@
+Sun Jun 6 14:04:43 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
+
+ * tao/Acceptor_Impl.h:
+ * tao/Environment.cpp:
+ * 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>
* tao/GIOP.cpp: Fixed a typo in read_header. Thanks to Jeff for
diff --git a/TAO/tao/Acceptor_Impl.h b/TAO/tao/Acceptor_Impl.h
index 9d6dc96d6ce..de100f75f2d 100644
--- a/TAO/tao/Acceptor_Impl.h
+++ b/TAO/tao/Acceptor_Impl.h
@@ -27,10 +27,20 @@
template<class SVC_HANDLER, ACE_PEER_ACCEPTOR_1> class TAO_Acceptor_Impl : public ACE_Acceptor<SVC_HANDLER,ACE_PEER_ACCEPTOR_2>
{
// = TITLE
- // @@ Carlos, please fill in here.
+ // Helper class to implement the acceptors in TAO
//
// = DESCRIPTION
- // @@ Carlos, please fill in here.
+ // TAO pluggable protocols framework provide an abstraction to
+ // represent any kind of acceptor object, the implementation of
+ // that acceptor is left for the pluggable protocol implementor,
+ // but the most common case would be to use an ACE_Acceptor<>
+ // instantiated over the right Svc_Handlers.
+ // But the Svc_Handlers must inherit the <orb_core> that owns the
+ // acceptor, though this could be implemented in each pluggable
+ // protocol we believe that this class would simplify that task
+ // and work in most cases. Pluggable protocol implementors are,
+ // of course, free to use something else.
+ //
public:
// = Initialization and termination methods.
TAO_Acceptor_Impl (ACE_Reactor * = 0,
diff --git a/TAO/tao/Environment.cpp b/TAO/tao/Environment.cpp
index 3f6be977140..fbefa9c59f3 100644
--- a/TAO/tao/Environment.cpp
+++ b/TAO/tao/Environment.cpp
@@ -172,7 +172,15 @@ int
CORBA::Environment::exception_type (void) const
{
// @@ Carlos, is this stuff that's properly "transformed" for EBCDIC
- // platforms?!
+ // platforms?!
+ // @@ Doug: Yes, they are used to compare against the _id() of the
+ // exception, which should have been mappend to the native
+ // codeset. Notice the "should" we haven't tried that stuff yet,
+ // and i find it hard to keep track of all the transformations
+ // going on, specially for the TypeCodes that are generated by
+ // the IDL compiler vs. the ones hard-coded in
+ // $TAO_ROOT/tao/Typecode_Constants.cpp
+
static char sysex_prefix [] = "IDL:omg.org/CORBA/";
static char typecode_extra [] = "TypeCode/";
static char poa_prefix [] = "IDL:PortableServer/";
@@ -259,11 +267,12 @@ CORBA_Environment_var &
CORBA_Environment_var::operator= (const CORBA_Environment_var &r)
{
if (this->ptr_ != 0)
- delete this->ptr_;
+ {
+ delete this->ptr_;
+ this->ptr_ = 0;
+ }
- // @@ Carlos, shouldn't we be checking for "new" failure? If so,
- // shouldn't we not be passing back *this but instead make this a
- // "void" function?
- this->ptr_ = new CORBA::Environment (*r.ptr_);
+ ACE_NEW_RETURN (this->ptr_,
+ CORBA::Environment (*r.ptr_), *this);
return *this;
}
diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp
index a5ff8b35850..fcaf8f5872f 100644
--- a/TAO/tao/GIOP.cpp
+++ b/TAO/tao/GIOP.cpp
@@ -136,23 +136,26 @@ TAO_GIOP::dump_msg (const char *label,
const u_char *ptr,
size_t len)
{
+ const int TAO_GIOP_VERSION_MAJOR_OFFSET = 4;
+ const int TAO_GIOP_VERSION_MINOR_OFFSET = 5;
+ const int TAO_GIOP_MESSAGE_TYPE_OFFSET = 7;
+
if (TAO_debug_level >= 5)
{
const char *message_name = "UNKNOWN MESSAGE";
- // @@ Carlos, where does the magic number '7' come from?!
- u_long slot = ptr[7];
+ u_long slot = ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET];
if (slot < sizeof (names)/sizeof(names[0]))
message_name = names [slot];
ACE_DEBUG ((LM_DEBUG,
"%s GIOP v%c.%c msg, %d data bytes, %s endian, %s",
label,
- digits[ptr[4]],
- digits[ptr[5]],
+ digits[ptr[TAO_GIOP_VERSION_MAJOR_OFFSET]],
+ digits[ptr[TAO_GIOP_VERSION_MINOR_OFFSET]],
len - TAO_GIOP_HEADER_LEN,
(ptr[6] == TAO_ENCAP_BYTE_ORDER) ? "my" : "other",
message_name));
- if (ptr[7] == TAO_GIOP::Request)
+ if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Request)
{
// @@ Only works if ServiceContextList is empty....
const CORBA::ULong *request_id =
@@ -162,7 +165,7 @@ TAO_GIOP::dump_msg (const char *label,
" = %d\n",
*request_id));
}
- else if (ptr[7] == TAO_GIOP::Reply)
+ else if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP::Reply)
{
const CORBA::ULong *request_id =
ACE_reinterpret_cast (const CORBA::ULong *,
@@ -304,11 +307,11 @@ TAO_GIOP::send_message (TAO_Transport *transport,
TAO_FUNCTION_PP_TIMEPROBE (TAO_GIOP_SEND_REQUEST_START);
// Ptr to first buffer.
- char *buf = (char *) stream.buffer ();
+ char *buf = (char *) stream.buffer ();
// Length of all buffers.
size_t total_len =
- stream.total_length ();
+ stream.total_length ();
// assert (buflen == (stream.length - stream.remaining));
@@ -414,7 +417,7 @@ static const char close_message [TAO_GIOP_HEADER_LEN] =
// uses EBCDIC).
0x47, // 'G'
0x49, // 'I'
- 0x4f, // 'O'
+ 0x4f, // 'O'
0x50, // 'P'
TAO_GIOP_MessageHeader::MY_MAJOR,
TAO_GIOP_MessageHeader::MY_MINOR,
@@ -437,8 +440,16 @@ TAO_GIOP::close_connection (TAO_Transport *transport,
(const u_char *) close_message,
TAO_GIOP_HEADER_LEN);
- // @@ Carlos, can you please check the return value on this?
ACE_HANDLE which = transport->handle ();
+ if (which == ACE_INVALID_HANDLE)
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) TAO_GIOP::close_connection -"
+ " connection already closed\n"));
+ return;
+ }
+
if (transport->send ((const u_char *) close_message,
TAO_GIOP_HEADER_LEN) == -1)
if (TAO_orbdebug)
@@ -465,7 +476,7 @@ error_message [TAO_GIOP_HEADER_LEN] =
// uses EBCDIC).
0x47, // 'G'
0x49, // 'I'
- 0x4f, // 'O'
+ 0x4f, // 'O'
0x50, // 'P'
TAO_GIOP_MessageHeader::MY_MAJOR,
TAO_GIOP_MessageHeader::MY_MINOR,
@@ -487,10 +498,11 @@ TAO_GIOP::send_error (TAO_Transport *transport)
// @@ Carlos, can you please check to see if <send_n> should have
// it's reply checked?
+ // @@ Doug: I'm not sure what do you want me to do here...
if (transport->send ((const u_char *)error_message,
TAO_GIOP_HEADER_LEN) == -1)
{
- if (TAO_orbdebug != 0)
+ if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"TAO (%P|%t) error sending error to %d\n",
which));
@@ -586,7 +598,7 @@ TAO_GIOP::read_header (TAO_Transport *transport,
char *buf = input.rd_ptr ();
size_t n;
-
+
for (int t = header_size;
t != 0;
t -= n)
@@ -599,7 +611,7 @@ TAO_GIOP::read_header (TAO_Transport *transport,
buf += n;
}
- if (TAO_GIOP::parse_header (orb_core,
+ if (TAO_GIOP::parse_header (orb_core,
input,
header) == -1)
return -1;
@@ -781,7 +793,7 @@ TAO_GIOP::process_server_message (TAO_Transport *transport,
'\0',
sizeof repbuf);
#endif /* ACE_HAS_PURIFY */
- TAO_OutputCDR output (repbuf,
+ TAO_OutputCDR output (repbuf,
sizeof repbuf,
TAO_ENCAP_BYTE_ORDER,
orb_core->output_cdr_buffer_allocator (),
@@ -892,8 +904,8 @@ TAO_GIOP::process_server_message (TAO_Transport *transport,
// exceptions it couldn't have been raised in the first place!
if (response_required)
{
- CORBA::UNKNOWN exception
- (CORBA::SystemException::minor_code_tao_
+ CORBA::UNKNOWN exception
+ (CORBA::SystemException::minor_code_tao_
(TAO_UNHANDLED_SERVER_CXX_EXCEPTION, 0),
CORBA::COMPLETED_MAYBE);
@@ -906,8 +918,7 @@ TAO_GIOP::process_server_message (TAO_Transport *transport,
ACE_ERROR ((LM_ERROR,
"TAO: (%P|%t) %p: cannot send exception\n",
"TAO_GIOP::process_server_message"));
- ACE_PRINT_EXCEPTION (exception,
- "TAO: ");
+ ACE_PRINT_EXCEPTION (exception, "TAO: ");
}
}
else if (TAO_debug_level > 0)
@@ -1069,7 +1080,7 @@ TAO_GIOP::process_server_locate (TAO_Transport *transport,
// If ObjectID not in table or reference is nil raise
// OBJECT_NOT_EXIST.
- if (CORBA::is_nil (object_reference)
+ if (CORBA::is_nil (object_reference)
|| find_status == -1)
ACE_TRY_THROW (CORBA::OBJECT_NOT_EXIST ());
@@ -1192,7 +1203,7 @@ TAO_GIOP::send_reply_exception (TAO_Transport *transport,
'\0',
sizeof repbuf);
#endif /* ACE_HAS_PURIFY */
- TAO_OutputCDR output (repbuf,
+ TAO_OutputCDR output (repbuf,
sizeof repbuf,
TAO_ENCAP_BYTE_ORDER,
orb_core->output_cdr_buffer_allocator (),
@@ -1303,7 +1314,7 @@ TAO_GIOP::start_message_std (TAO_GIOP::Message_Type type,
// uses EBCDIC).
0x47, // 'G'
0x49, // 'I'
- 0x4f, // 'O'
+ 0x4f, // 'O'
0x50, // 'P'
TAO_GIOP_MessageHeader::MY_MAJOR,
TAO_GIOP_MessageHeader::MY_MINOR,
diff --git a/TAO/tao/IOP.pidl b/TAO/tao/IOP.pidl
index cbe469fbc53..83d3580fdbe 100644
--- a/TAO/tao/IOP.pidl
+++ b/TAO/tao/IOP.pidl
@@ -2,8 +2,71 @@
// $Id$
//
+#pragma prefix "omg.org"
+
module IOP
{
+ typedef unsigned long ProfileId;
+ const ProfileId TAG_INTERNET_IOP = 0;
+ const ProfileId TAG_MULTIPLE_COMPONENTS = 0;
+
+ struct TaggedProfile {
+ ProfileId tag;
+ sequence<octet> profile_data;
+ };
+
+ struct IOR {
+ string type_id;
+ sequence<TaggedProfile> profiles;
+ };
+
typedef unsigned long ComponentId;
+ struct TaggedComponent {
+ ComponentId tag;
+ sequence<octet> component_data;
+ };
+ typedef sequence<TaggedComponent> MultipleComponentProfile;
+
+ const ComponentId TAG_ORB_TYPE = 0;
+ const ComponentId TAG_CODE_SETS = 1;
+ const ComponentId TAG_POLICIES = 2;
+ const ComponentId TAG_ALTERNATE_IIOP_ADDRESS = 3;
+ const ComponentId TAG_ASSOCIATION_OPTIONS = 13;
+ const ComponentId TAG_SEC_NAME = 14;
+ const ComponentId TAG_SPKM_1_SEC_MECH = 15;
+ const ComponentId TAG_SPKM_2_SEC_MECH = 16;
+ const ComponentId TAG_KerberosV5_SEC_MECH = 17;
+ const ComponentId TAG_CSI_ECMA_Secret_SEC_MECH = 18;
+ const ComponentId TAG_CSI_ECMA_Hybrid_SEC_MECH = 19;
+ const ComponentId TAG_SSL_SEC_TRANS = 20;
+ const ComponentId TAG_CSI_ECMA_Public_SEC_MECH = 21;
+ const ComponentId TAG_GENERIC_SEC_MECH = 22;
+
+ const ComponentId TAG_COMPLETE_OBJECT_KEY = 5;
+ const ComponentId TAG_ENDPOINT_ID_POSITION = 6;
+ const ComponentId TAG_LOCATION_POLICY = 12;
+ const ComponentId TAG_DCE_STRING_BINDING = 100;
+ const ComponentId TAG_DCE_BINDING_NAME = 101;
+ const ComponentId TAG_DCE_NO_PIPES = 102;
+ const ComponentId TAG_DCE_SEC_MECH = 103;
+
typedef unsigned long ServiceId;
+ struct ServiceContext {
+ ServiceId context_id;
+ sequence <octet> context_data;
+ };
+ typedef sequence <ServiceContext> ServiceContextList;
+
+ const ServiceId TransactionService = 0;
+ const ServiceId CodeSets = 1;
+ const ServiceId ChainBypassCheck = 2;
+ const ServiceId ChainBypassInfo = 3;
+ const ServiceId LogicalThreadId = 4;
+ const ServiceId BI_DIR_IIOP = 5;
+ const ServiceId SendingContextRunTime = 6;
+ const ServiceId INVOCATION_POLICIES = 7;
+ // const ServiceId FORWARDED_IDENTITY = 8;
+ const ServiceId UnknownExceptionInfo = 9;
};
+
+#pragma prefix ""
diff --git a/TAO/tao/Wait_Strategy.cpp b/TAO/tao/Wait_Strategy.cpp
index edafbfeb06a..a19783bff80 100644
--- a/TAO/tao/Wait_Strategy.cpp
+++ b/TAO/tao/Wait_Strategy.cpp
@@ -175,13 +175,6 @@ TAO_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core,
int
TAO_Wait_On_Leader_Follower::wait (void)
{
- // @@ Do we need this code (checking for the difference in the
- // Reactor)? (Alex).
- // @@ Alex: yes, the same connection may be used in multiple
- // threads, each with its own reactor.
- // @@ Carlos: But, where is that code now? I cant see it here now?
- // (Alex).
-
// Cache the ORB core, it won't change and is used multiple times
// below:
TAO_ORB_Core* orb_core =