diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/tao/boa.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/default_server.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/svrrqst.cpp | 56 | ||||
-rw-r--r-- | TAO/tao/svrrqst.h | 17 | ||||
-rw-r--r-- | TAO/tao/svrrqst.i | 14 |
5 files changed, 53 insertions, 54 deletions
diff --git a/TAO/tao/boa.cpp b/TAO/tao/boa.cpp index bcf74135d2e..f7bd93b3061 100644 --- a/TAO/tao/boa.cpp +++ b/TAO/tao/boa.cpp @@ -220,7 +220,7 @@ CORBA_BOA::handle_request (TAO_GIOP_RequestHeader hdr, CORBA::TypeCode_ptr tc; const void *value; - if (!svr_req._params && env.exception () == 0) + if (!svr_req.params_ && env.exception () == 0) { dmsg ("DSI user error, didn't supply params"); env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO)); @@ -228,7 +228,7 @@ CORBA_BOA::handle_request (TAO_GIOP_RequestHeader hdr, if (env.exception () != 0) { // standard exceptions only - CORBA::Environment env2; + CORBA::Environment env2; CORBA::Exception *x = env.exception (); CORBA::TypeCode_ptr except_tc = x->type (); @@ -241,12 +241,12 @@ CORBA_BOA::handle_request (TAO_GIOP_RequestHeader hdr, CORBA::TypeCode_ptr except_tc; x = (CORBA::Exception *) svr_req._exception->value (); - except_tc = svr_req._exception->type (); + except_tc = svr_req.exception_->type (); // Finish the GIOP Reply header, then marshal the exception. // // XXX x->type () someday ... - if (svr_req._ex_type == CORBA::SYSTEM_EXCEPTION) + if (svr_req.ex_type_ == CORBA::SYSTEM_EXCEPTION) response.put_ulong (TAO_GIOP_SYSTEM_EXCEPTION); else response.put_ulong (TAO_GIOP_USER_EXCEPTION); @@ -259,17 +259,17 @@ CORBA_BOA::handle_request (TAO_GIOP_RequestHeader hdr, response.put_ulong (TAO_GIOP_NO_EXCEPTION); // ... then send any return value ... - if (svr_req._retval) + if (svr_req.retval_) { - tc = svr_req._retval->type (); - value = svr_req._retval->value (); + tc = svr_req.retval_->type (); + value = svr_req.retval_->value (); (void) response.encode (tc, value, 0, env); } // ... followed by "inout" and "out" parameters, left to right - for (u_int i = 0; i < svr_req._params->count (); i++) + for (u_int i = 0; i < svr_req.params_->count (); i++) { - CORBA::NamedValue_ptr nv = svr_req._params->item (i); + CORBA::NamedValue_ptr nv = svr_req.params_->item (i); CORBA::Any_ptr any; if (!(nv->flags () & (CORBA::ARG_INOUT|CORBA::ARG_OUT))) diff --git a/TAO/tao/default_server.cpp b/TAO/tao/default_server.cpp index 3200a1dbddf..8d253dbc453 100644 --- a/TAO/tao/default_server.cpp +++ b/TAO/tao/default_server.cpp @@ -57,7 +57,7 @@ TAO_Default_Server_Strategy_Factory::create_object_table (void) // should be done is to create the User_Server_Strategy_Factory // and just link it in. The default server would only encompass // the strategies that are "shipped", so to speak. --cjc - objtable = TAO_ORB_Core_instance() -> oa_params() -> userdef_lookup_strategy(); + objtable = TAO_ORB_Core_instance()->oa_params()->userdef_lookup_strategy (); break; case TAO_ACTIVE_DEMUX: ACE_NEW_RETURN (objtable, diff --git a/TAO/tao/svrrqst.cpp b/TAO/tao/svrrqst.cpp index 0f69e523873..cea1cb0fa74 100644 --- a/TAO/tao/svrrqst.cpp +++ b/TAO/tao/svrrqst.cpp @@ -34,12 +34,12 @@ IIOP_ServerRequest::~IIOP_ServerRequest (void) { ACE_ASSERT (refcount_ == 0); - if (_params) - CORBA::release (_params); - if (_retval) - delete _retval; - if (_exception) - delete _exception; + if (params_) + CORBA::release (params_); + if (retval_) + delete retval_; + if (exception_) + delete exception_; } ULONG __stdcall @@ -95,18 +95,13 @@ IIOP_ServerRequest::params (CORBA::NVList_ptr list, { env.clear (); - // Save params for later use when marshaling reply - _params = list; + // Save params for later use when marshaling the reply. + this->params_ = list; - // Then unmarshal each "in" and "inout" parameter + // Then unmarshal each "in" and "inout" parameter. for (u_int i = 0; i < list->count (); i++) { - CORBA::NamedValue_ptr nv; - CORBA::Any_ptr any; - CORBA::TypeCode_ptr tc; - void *value; - - nv = list->item (i); + CORBA::NamedValue_ptr nv = list->item (i); if (ACE_BIT_DISABLED (nv->flags (), CORBA::ARG_IN | CORBA::ARG_INOUT)) continue; @@ -117,13 +112,16 @@ IIOP_ServerRequest::params (CORBA::NVList_ptr list, // NOTE: desirable to have a way to let the dynamic // implementation routine preallocate this data, for // environments where DSI is just being used in lieu of a - // language mapped server side API and the size is really + // language mapped server-side API and the size is really // knowable in advance. - any = nv->value (); - tc = any->type (); + CORBA::Any_ptr any = nv->value (); + CORBA::TypeCode_ptr tc = any->type (); + tc->AddRef (); ACE_NEW (value, char [tc->size (env)]); + + void *value; any->replace (tc, value, CORBA::B_TRUE, env); // Decrement the refcount of "tc". @@ -138,16 +136,16 @@ IIOP_ServerRequest::params (CORBA::NVList_ptr list, tc->Release (); // Then just unmarshal the value. - (void) _incoming->decode (tc, value, 0, env); + (void) incoming_->decode (tc, value, 0, env); } // If any data is left over, it'd be context values ... else error. // We don't support context values, so it's always an error. - if (_incoming->bytes_remaining () != 0) + if (incoming_->bytes_remaining () != 0) { dmsg1 ("params (), %d bytes remaining (error)", - _incoming->bytes_remaining ()); + incoming_->bytes_remaining ()); env.exception (new CORBA::BAD_PARAM (CORBA::COMPLETED_NO)); } } @@ -162,10 +160,10 @@ IIOP_ServerRequest::result (CORBA::Any_ptr value, { env.clear (); - if (!_params || _retval || _exception) + if (!params_ || retval_ || exception_) env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO)); else - _retval = value; + retval_ = value; // XXX send the message now! } @@ -177,13 +175,13 @@ IIOP_ServerRequest::exception (CORBA::ExceptionType type, CORBA::Any_ptr value, CORBA::Environment &env) { - if (!_params || _retval || _exception) + if (!params_ || retval_ || exception_) env.exception (new CORBA::BAD_INV_ORDER (CORBA::COMPLETED_NO)); else { env.clear (); - _exception = value; - _ex_type = type; + exception_ = value; + ex_type_ = type; } // XXX send the message now! @@ -194,7 +192,7 @@ IIOP_ServerRequest::exception (CORBA::ExceptionType type, CORBA::String __stdcall IIOP_ServerRequest::op_name (void) { - return _opname; + return opname_; } CORBA::Object_ptr __stdcall @@ -214,11 +212,11 @@ IIOP_ServerRequest::caller (void) CORBA::ORB_ptr __stdcall IIOP_ServerRequest::orb (void) { - return _orb; + return orb_; } CORBA::BOA_ptr __stdcall IIOP_ServerRequest::oa (void) { - return _boa; + return boa_; } diff --git a/TAO/tao/svrrqst.h b/TAO/tao/svrrqst.h index 7be91543ff9..ffa426158ab 100644 --- a/TAO/tao/svrrqst.h +++ b/TAO/tao/svrrqst.h @@ -114,12 +114,13 @@ public: void **ppv); // private: - CORBA::String _opname; - CDR *_incoming; - CORBA::NVList_ptr _params; - CORBA::Any_ptr _retval; - CORBA::Any_ptr _exception; - CORBA::ExceptionType _ex_type; + // @@ Please comment me. + CORBA::String opname_; + CDR *incoming_; + CORBA::NVList_ptr params_; + CORBA::Any_ptr retval_; + CORBA::Any_ptr exception_; + CORBA::ExceptionType ex_type_; void release (void) { refcount_--; } // Just drop the refcount, don't destroy the object; most of these @@ -130,9 +131,9 @@ private: u_int refcount_; - CORBA::ORB_ptr _orb; + CORBA::ORB_ptr orb_; - CORBA::BOA_ptr _boa; + CORBA::BOA_ptr boa_; }; #endif /* TAO_SVRRQST_H */ diff --git a/TAO/tao/svrrqst.i b/TAO/tao/svrrqst.i index 4a9967ab70e..c89917e7c67 100644 --- a/TAO/tao/svrrqst.i +++ b/TAO/tao/svrrqst.i @@ -2,12 +2,12 @@ ACE_INLINE IIOP_ServerRequest::IIOP_ServerRequest(CDR *msg, CORBA::ORB_ptr the_orb, CORBA::BOA_ptr the_boa) - : _incoming (msg), - _params (0), - _retval (0), - _exception (0), - _ex_type (CORBA::NO_EXCEPTION), + : incoming_ (msg), + params_ (0), + retval_ (0), + exception_ (0), + ex_type_ (CORBA::NO_EXCEPTION), refcount_ (1), - _orb (the_orb), - _boa (the_boa) + orb_ (the_orb), + boa_ (the_boa) {} |