summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-07 23:15:23 +0000
committeralex <alex@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-07-07 23:15:23 +0000
commitccbb42052b88e44542303375851fda01e91809e1 (patch)
tree5e9899fb5b205a1492d258ece43b5871589e91cf
parent3446c5ccc9cff052eed518959e9e4f6144b39b5c (diff)
downloadATCD-ccbb42052b88e44542303375851fda01e91809e1.tar.gz
ChangeLogTag:Wed Jul 7 18:13:40 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c4
-rw-r--r--TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp4
-rw-r--r--TAO/tao/Invocation.cpp5
-rw-r--r--TAO/tao/Invocation.i6
-rw-r--r--TAO/tao/Reply_Dispatcher.cpp40
-rw-r--r--TAO/tao/Reply_Dispatcher.h17
-rw-r--r--TAO/tests/AMI/orb_creation.cpp2
7 files changed, 35 insertions, 43 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index b72ccdc937d..75556ea5084 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,5 +1,7 @@
-Wed Jul 7 10:55:06 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
+Wed Jul 7 18:13:40 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
+Wed Jul 7 10:55:06 1999 Alexander Babu Arulanthu <alex@cs.wustl.edu>
+
* Asynch_Invocation.cpp
* Asynch_Invocation.h
* MessagingC.h
diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
index e973cdeb359..90db4fab104 100644
--- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp
@@ -46,8 +46,8 @@ be_visitor_typecode_decl::visit_type (be_type *node)
TAO_OutStream *os = this->ctx_->stream ();
// Generate the typecode decl.
- char *prefix = 0;
- char *postfix = 0;
+ const char *prefix = 0;
+ const char *postfix = 0;
if (this->ctx_->state () == TAO_CodeGen::TAO_AMI_HANDLER_TYPECODE_DECL)
{
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index f7523bf9a15..3e8ee4ca6cf 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -10,11 +10,6 @@
#include "tao/Pluggable.h"
#include "tao/Connector_Registry.h"
-#include "tao/Wait_Strategy.h"
-// @@ This file is here so that we can call sending request method on
-// the wait strategy. It is a hack and this should go
-// away. (Alex).
-
#if !defined (__ACE_INLINE__)
# include "tao/Invocation.i"
#endif /* ! __ACE_INLINE__ */
diff --git a/TAO/tao/Invocation.i b/TAO/tao/Invocation.i
index 229ad64d456..e832e474c27 100644
--- a/TAO/tao/Invocation.i
+++ b/TAO/tao/Invocation.i
@@ -24,7 +24,8 @@ TAO_GIOP_Twoway_Invocation::
TAO_GIOP_Twoway_Invocation (TAO_Stub *stub,
const char *operation,
TAO_ORB_Core *orb_core)
- : TAO_GIOP_Invocation (stub, operation, orb_core)
+ : TAO_GIOP_Invocation (stub, operation, orb_core),
+ rd_ (orb_core)
{
}
@@ -66,7 +67,8 @@ ACE_INLINE
TAO_GIOP_Locate_Request_Invocation::
TAO_GIOP_Locate_Request_Invocation (TAO_Stub *stub,
TAO_ORB_Core *orb_core)
- : TAO_GIOP_Invocation (stub, 0, orb_core)
+ : TAO_GIOP_Invocation (stub, 0, orb_core),
+ rd_ (orb_core)
{
}
diff --git a/TAO/tao/Reply_Dispatcher.cpp b/TAO/tao/Reply_Dispatcher.cpp
index 2cbbf99fa41..0185b43958d 100644
--- a/TAO/tao/Reply_Dispatcher.cpp
+++ b/TAO/tao/Reply_Dispatcher.cpp
@@ -2,6 +2,7 @@
#include "tao/Reply_Dispatcher.h"
#include "tao/debug.h"
+#include "tao/ORB_Core.h"
#if !defined (__ACE_INLINE__)
#include "tao/Reply_Dispatcher.i"
@@ -29,13 +30,15 @@ TAO_Reply_Dispatcher::message_state (void) const
// {
// return reply_received_;
// }
-
+
// *********************************************************************
// Constructor.
-TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher (void)
+TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher (TAO_ORB_Core *orb_core)
: message_state_ (0),
- reply_cdr_ (0)
+ reply_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE),
+ TAO_ENCAP_BYTE_ORDER,
+ orb_core)
{
}
@@ -64,16 +67,9 @@ TAO_Synch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status,
TAO_GIOP_ServiceContext* context_list = reply_ctx.get_buffer (1);
this->reply_ctx_.replace (max, len, context_list, 1);
- // @@ Unnecessary copying should be avoided here (Alex).
- // @@ Carlos: I am confused about implementing this one. In the
- // MUXED TMS, this mess state is going to get deleted, as soon as
- // we return from here. So we need to save the CDR. But in the
- // Exclusive case, the message state will be there. So, how do we
- // correctly own the CDR here? (Alex).
- ACE_NEW_RETURN (this->reply_cdr_,
- TAO_InputCDR (message_state->cdr.steal_contents ()),
- 0);
-
+ // Steal the buffer so that no copying is done.
+ this->reply_cdr_.reset (message_state->cdr.steal_contents (),
+ message_state->cdr.byte_order ());
return 0;
}
@@ -84,9 +80,9 @@ TAO_Synch_Reply_Dispatcher::message_state (void) const
}
TAO_InputCDR &
-TAO_Synch_Reply_Dispatcher::reply_cdr (void) const
+TAO_Synch_Reply_Dispatcher::reply_cdr (void)
{
- return *this->reply_cdr_;
+ return this->reply_cdr_;
}
@@ -113,7 +109,7 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status,
TAO_GIOP_Message_State *message_state)
{
// this->reply_received_ = 1;
-
+
this->reply_status_ = reply_status;
this->version_ = version;
this->message_state_ = message_state;
@@ -130,18 +126,18 @@ TAO_Asynch_Reply_Dispatcher::dispatch_reply (CORBA::ULong reply_status,
ACE_DEBUG ((LM_DEBUG,
"(%P | %t):TAO_Asynch_Reply_Dispatcher::dispatch_reply:\n"));
}
-
+
ACE_DECLARE_NEW_CORBA_ENV;
-
+
// Call the Reply Handler's skeleton.
reply_handler_skel_ (message_state_->cdr,
reply_handler_,
ACE_TRY_ENV);
-
- // This was dynamically allocated. Now the job is done. Commit
- // suicide here.
+
+ // This was dynamically allocated. Now the job is done. Commit
+ // suicide here.
delete this;
-
+
return 0;
}
diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h
index d5cabe7aa4b..1d9ee9c4f7b 100644
--- a/TAO/tao/Reply_Dispatcher.h
+++ b/TAO/tao/Reply_Dispatcher.h
@@ -49,7 +49,7 @@ public:
// Dispatch the reply.
virtual TAO_GIOP_Message_State *message_state (void) const;
- // Get the Message State into which the reply has been read.
+ // Get the Message State into which the reply has been read.
// virtual int reply_received (void) const;
// Return the reply received flag.
@@ -71,7 +71,7 @@ class TAO_Export TAO_Synch_Reply_Dispatcher : public TAO_Reply_Dispatcher
//
public:
- TAO_Synch_Reply_Dispatcher (void);
+ TAO_Synch_Reply_Dispatcher (TAO_ORB_Core *orb_core);
// Constructor.
virtual ~TAO_Synch_Reply_Dispatcher (void);
@@ -97,7 +97,7 @@ public:
virtual TAO_GIOP_Message_State *message_state (void) const;
// Return the message state of this invocation.
- virtual TAO_InputCDR &reply_cdr (void) const;
+ virtual TAO_InputCDR &reply_cdr (void);
// Return the reply CDR.
private:
@@ -115,11 +115,8 @@ private:
// @@ Carlos : message_state should go away. All we need is the reply
// cdr. Is that rite? (Alex).
- TAO_InputCDR *reply_cdr_;
- // CDR where the reply message is placed.
- // @@ Carlos : You mentioned that wherever this is used, we should
- // make sure we dont do any copying. I havent taken care of this
- // yet. (Alex).
+ TAO_InputCDR reply_cdr_;
+ // CDR where the reply message is placed.
};
// *********************************************************************
@@ -128,7 +125,7 @@ class TAO_Export TAO_Asynch_Reply_Dispatcher : public TAO_Reply_Dispatcher
{
// = TITLE
//
- // Reply dispatcher for Asynchoronous Method Invocation (AMI)s.
+ // Reply dispatcher for Asynchoronous Method Invocation (AMI)s.
//
// = DESCRIPTION
//
@@ -156,7 +153,7 @@ public:
TAO_GIOP_Message_State* message_state);
// Dispatch the reply. This involves demarshalling the reply and
// calling the appropriate call back hook method on the reply
- // handler.
+ // handler.
virtual TAO_GIOP_Message_State *message_state (void) const;
// Return the message state.
diff --git a/TAO/tests/AMI/orb_creation.cpp b/TAO/tests/AMI/orb_creation.cpp
index 117441de000..f3212b0f17b 100644
--- a/TAO/tests/AMI/orb_creation.cpp
+++ b/TAO/tests/AMI/orb_creation.cpp
@@ -139,7 +139,7 @@ Client::svc (void)
// If we are using a global ORB this is a nop, otherwise it
// initializes the ORB resources for this thread.
int argc = 0;
- char* argv[] = { "" };
+ const char* argv[] = { "" };
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
ACE_TRY_CHECK;