summaryrefslogtreecommitdiff
path: root/TAO/tests/RTScheduling/Scheduler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/RTScheduling/Scheduler.cpp')
-rw-r--r--TAO/tests/RTScheduling/Scheduler.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/TAO/tests/RTScheduling/Scheduler.cpp b/TAO/tests/RTScheduling/Scheduler.cpp
index 31e4d368509..5e9ac4bf9e0 100644
--- a/TAO/tests/RTScheduling/Scheduler.cpp
+++ b/TAO/tests/RTScheduling/Scheduler.cpp
@@ -6,14 +6,16 @@
#include "ace/Argv_Type_Converter.h"
#include "tao/RTScheduling/Request_Interceptor.h"
+#include "tao/IOP_IORC.h"
+
TAO_Scheduler::TAO_Scheduler (CORBA::ORB_ptr orb ACE_ENV_ARG_DECL)
{
- CORBA::Object_ptr current_obj =
+ CORBA::Object_var current_obj =
orb->resolve_initial_references ("RTScheduler_Current"
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
- current_ = RTScheduling::Current::_narrow (current_obj
+ current_ = RTScheduling::Current::_narrow (current_obj.in ()
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
}
@@ -146,23 +148,14 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
ACE_THROW_SPEC ((CORBA::SystemException,
PortableInterceptor::ForwardRequest))
{
- IOP::ServiceContext* serv_cxt = 0;
+ IOP::ServiceContext_var serv_cxt;
ACE_TRY
{
serv_cxt = request_info->get_request_service_context (Server_Interceptor::SchedulingInfo
ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
- }
- ACE_CATCHANY
- {
- ACE_DEBUG ((LM_DEBUG,
- "Invalid Service Context\n"));
- }
- ACE_ENDTRY;
- if (serv_cxt != 0)
- {
size_t gu_id;
ACE_OS::memcpy (&gu_id,
serv_cxt->context_data.get_buffer (),
@@ -183,6 +176,12 @@ TAO_Scheduler::receive_request (PortableInterceptor::ServerRequestInfo_ptr reque
guid_out.ptr () = guid;
}
+ ACE_CATCHANY
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "Invalid Service Context\n"));
+ }
+ ACE_ENDTRY;
}
void