diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-19 20:28:50 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-03-19 20:28:50 +0000 |
commit | e5187e22e03f852e8ff66449ee5aef13a8b4177c (patch) | |
tree | aad2374bef44ac3f04afe897fda21b79225bf820 | |
parent | f460112334e5164338631f5ec05ec92ce2199f44 (diff) | |
download | ATCD-e5187e22e03f852e8ff66449ee5aef13a8b4177c.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-99c | 7 | ||||
-rw-r--r-- | TAO/examples/POA/DSI/Database_i.cpp | 9 | ||||
-rw-r--r-- | TAO/tao/Server_Request.cpp | 21 |
3 files changed, 26 insertions, 11 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index b5eed11dee6..3d6599d921b 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,10 @@ +Fri Mar 19 14:20:58 1999 Jeff Parsons <parsons@cs.wustl.edu> + + * tao/Server_Request.cpp: + Fixed an incorrect (and on closer inspection, unnecessary) + use of TAO_CHECK_ENV. Also added a release() for a newly + allocated (and immedialtely duplicated) message block. + Fri Mar 19 01:19:16 1999 Jeff Parsons <parsons@cs.wustl.edu> * tao/Server_Request.h: diff --git a/TAO/examples/POA/DSI/Database_i.cpp b/TAO/examples/POA/DSI/Database_i.cpp index 94ceae588be..c4ff5f87e44 100644 --- a/TAO/examples/POA/DSI/Database_i.cpp +++ b/TAO/examples/POA/DSI/Database_i.cpp @@ -61,10 +61,9 @@ DatabaseImpl::Entry::_is_a (CORBA::ServerRequest_ptr request, CORBA::Environment &env) { CORBA::NVList_ptr list; - this->orb_->create_list (1, list); + this->orb_->create_list (0, list); - char *value = 0; - CORBA::Any any_1 (CORBA::_tc_string, &value); + CORBA::Any any_1 (CORBA::_tc_string); CORBA::NamedValue_ptr named_value_1 = list->add_value ("value", any_1, @@ -78,6 +77,10 @@ DatabaseImpl::Entry::_is_a (CORBA::ServerRequest_ptr request, if (env.exception () != 0) return; + char *value; + CORBA::Any_ptr ap = list->item (0, env)->value (); + *ap >>= value; + CORBA::Boolean result; if (!ACE_OS::strcmp (value, "IDL:Database/Employee:1.0") || !ACE_OS::strcmp (value, "IDL:Database/Entry:1.0") || diff --git a/TAO/tao/Server_Request.cpp b/TAO/tao/Server_Request.cpp index 6c170907b34..6ff78b955c9 100644 --- a/TAO/tao/Server_Request.cpp +++ b/TAO/tao/Server_Request.cpp @@ -263,12 +263,6 @@ IIOP_ServerRequest::arguments (CORBA::NVList_ptr &list, // This will be the start of a new message block. begin = this->incoming_->rd_ptr (); - // No need to duplicate - it gets done below. - ACE_Message_Block *cdr = ACE_const_cast (ACE_Message_Block*, - this->incoming_->start ()); - - cdr->rd_ptr (begin); - // Skip over the next aregument. CORBA::TypeCode::traverse_status status = this->incoming_->skip (tc.in (), env); @@ -289,13 +283,24 @@ IIOP_ServerRequest::arguments (CORBA::NVList_ptr &list, // This will be the end of the new message block. end = this->incoming_->rd_ptr (); + // Allocate the new message block and set its endpoints. + ACE_Message_Block *cdr; + + ACE_NEW (cdr, + ACE_Message_Block (end - begin)); + + cdr->rd_ptr (begin); + cdr->wr_ptr (end); - // Stick it into the Any. It gets duplicated here. + // Stick it into the Any. It gets duplicated there. any->_tao_replace (tc.in (), cdr, 0, - env); + env); + + // Now we can release the original. + ACE_Message_Block::release (cdr); } // If any data is left over, it'd be context values ... else error. |