summaryrefslogtreecommitdiff
path: root/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp')
-rw-r--r--TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp102
1 files changed, 34 insertions, 68 deletions
diff --git a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
index a9ea659b832..44121112bd8 100644
--- a/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
+++ b/TAO/tests/Portable_Interceptors/Bug_1559/client_interceptor.cpp
@@ -29,22 +29,21 @@ Echo_Client_Request_Interceptor::~Echo_Client_Request_Interceptor (void)
}
char *
-Echo_Client_Request_Interceptor::name (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Echo_Client_Request_Interceptor::name (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
return CORBA::string_dup (this->myname_);
}
void
-Echo_Client_Request_Interceptor::destroy (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
+Echo_Client_Request_Interceptor::destroy (void)
ACE_THROW_SPEC ((CORBA::SystemException))
{
}
void
Echo_Client_Request_Interceptor::send_poll (
- PortableInterceptor::ClientRequestInfo_ptr
- ACE_ENV_ARG_DECL_NOT_USED)
+ PortableInterceptor::ClientRequestInfo_ptr)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Do Nothing
@@ -52,8 +51,7 @@ Echo_Client_Request_Interceptor::send_poll (
void
Echo_Client_Request_Interceptor::send_request (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -61,22 +59,17 @@ Echo_Client_Request_Interceptor::send_request (
{
int argc = 0;
this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_id_.in ());
}
CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ ri->operation ();
CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ ri->target ();
CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->object_to_string (target.in ());
ACE_DEBUG ((LM_DEBUG,
"%s.send_request "
@@ -87,17 +80,15 @@ Echo_Client_Request_Interceptor::send_request (
send_request_count++;
- ACE_TRY_NEW_ENV
+ try
{
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
+ ri->get_request_service_context (::service_id);
}
- ACE_CATCH (CORBA::BAD_PARAM, error)
+ catch (const CORBA::BAD_PARAM&)
{
// This is supposed to happen
exception_count++;
}
- ACE_ENDTRY;
if (send_request_count == 1)
{
@@ -120,13 +111,11 @@ Echo_Client_Request_Interceptor::send_request (
sc.context_data.replace (string_len, string_len, buf, 1);
// Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->add_request_service_context (sc, 0);
// Check that the request service context can be retrieved.
IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_request_service_context (::service_id);
const char *buf2 =
reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
@@ -161,13 +150,11 @@ Echo_Client_Request_Interceptor::send_request (
sc.context_data.replace (string_len, string_len, buf, 1);
// Add this context to the service context list.
- ri->add_request_service_context (sc, 0 ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->add_request_service_context (sc, 0);
// Check that the request service context can be retrieved.
IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_request_service_context (::service_id);
const char *buf2 =
reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
@@ -190,8 +177,7 @@ Echo_Client_Request_Interceptor::send_request (
void
Echo_Client_Request_Interceptor::receive_reply (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException))
{
@@ -199,22 +185,17 @@ Echo_Client_Request_Interceptor::receive_reply (
{
int argc = 0;
this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_id_.in ());
}
CORBA::String_var operation =
- ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ ri->operation ();
CORBA::Object_var target =
- ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ ri->target ();
CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->object_to_string (target.in ());
ACE_DEBUG ((LM_DEBUG,
"%s.receive_reply from "
@@ -226,8 +207,7 @@ Echo_Client_Request_Interceptor::receive_reply (
// Check that the reply service context was received as
// expected.
IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_reply_service_context (::service_id);
const char *buf =
reinterpret_cast<const char *> (sc->context_data.get_buffer ());
@@ -244,8 +224,7 @@ Echo_Client_Request_Interceptor::receive_reply (
// Check that no one has messed with the request service context.
IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_request_service_context (::service_id);
const char *buf2 =
reinterpret_cast<const char *> (sc2->context_data.get_buffer ());
@@ -264,8 +243,7 @@ Echo_Client_Request_Interceptor::receive_reply (
void
Echo_Client_Request_Interceptor::receive_other (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -276,15 +254,12 @@ Echo_Client_Request_Interceptor::receive_other (
this->orb_id_.in ());
}
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CORBA::String_var operation = ri->operation ();
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CORBA::Object_var target = ri->target ();
CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->object_to_string (target.in ());
ACE_DEBUG ((LM_DEBUG,
"%s.receive_other from "
@@ -295,8 +270,7 @@ Echo_Client_Request_Interceptor::receive_other (
// Check that no one has messed with the request service context.
IOP::ServiceContext_var sc =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_request_service_context (::service_id);
const char *buf =
reinterpret_cast<const char *> (sc->context_data.get_buffer ());
@@ -313,8 +287,7 @@ Echo_Client_Request_Interceptor::receive_other (
void
Echo_Client_Request_Interceptor::receive_exception (
- PortableInterceptor::ClientRequestInfo_ptr ri
- ACE_ENV_ARG_DECL)
+ PortableInterceptor::ClientRequestInfo_ptr ri)
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
@@ -323,20 +296,15 @@ Echo_Client_Request_Interceptor::receive_exception (
{
int argc = 0;
this->orb_ = CORBA::ORB_init (argc, 0,
- this->orb_id_.in ()
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_id_.in ());
}
- CORBA::String_var operation = ri->operation (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CORBA::String_var operation = ri->operation ();
- CORBA::Object_var target = ri->target (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK;
+ CORBA::Object_var target = ri->target ();
CORBA::String_var ior =
- this->orb_->object_to_string (target.in () ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ this->orb_->object_to_string (target.in ());
ACE_DEBUG ((LM_DEBUG,
"%s.received_exception "
@@ -348,8 +316,7 @@ Echo_Client_Request_Interceptor::receive_exception (
// Check that the reply service context was received as
// expected.
IOP::ServiceContext_var sc =
- ri->get_reply_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_reply_service_context (::service_id);
const char *buf =
reinterpret_cast<const char *> (sc->context_data.get_buffer ());
@@ -366,8 +333,7 @@ Echo_Client_Request_Interceptor::receive_exception (
// Check that no one has messed with the request service context.
IOP::ServiceContext_var sc2 =
- ri->get_request_service_context (::service_id ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ri->get_request_service_context (::service_id);
const char *buf2 =
reinterpret_cast<const char *> (sc2->context_data.get_buffer ());