Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / AMI / Server_Interceptor.cpp
blob4ad01b0f9830d2b020910de59a90e7b88a182520
1 /**
2 * @file Server_Interceptor.cpp
4 * @author Carlos O'Ryan <coryan@atdesk.com>
5 */
7 #include "Server_Interceptor.h"
8 #include "Shared_Interceptor.h"
9 #include "tao/OctetSeqC.h"
10 #include "ace/OS_NS_string.h"
12 Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor ()
16 char *
17 Echo_Server_Request_Interceptor::name ()
19 return CORBA::string_dup ("Echo_Server_Interceptor");
22 void
23 Echo_Server_Request_Interceptor::destroy ()
27 void
28 Echo_Server_Request_Interceptor::receive_request_service_contexts (
29 PortableInterceptor::ServerRequestInfo_ptr ri)
31 CORBA::String_var operation =
32 ri->operation ();
34 if (ACE_OS::strcmp ("_is_a", operation.in ()) == 0)
35 return;
37 IOP::ServiceId id = ::service_id;
38 IOP::ServiceContext_var sc =
39 ri->get_request_service_context (id);
41 if (sc->context_data.length() != magic_cookie_len
42 || ACE_OS::memcmp(
43 magic_cookie, sc->context_data.get_buffer(),
44 magic_cookie_len) != 0)
46 throw CORBA::BAD_PARAM();
51 void
52 Echo_Server_Request_Interceptor::receive_request (
53 PortableInterceptor::ServerRequestInfo_ptr)
57 void
58 Echo_Server_Request_Interceptor::send_reply (
59 PortableInterceptor::ServerRequestInfo_ptr)
63 void
64 Echo_Server_Request_Interceptor::send_exception (
65 PortableInterceptor::ServerRequestInfo_ptr)
69 void
70 Echo_Server_Request_Interceptor::send_other (
71 PortableInterceptor::ServerRequestInfo_ptr)