Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / interop-tests / CdrOutArg / orbix / server_interceptor.cxx
blob9c8f4d5242adaf595290e76bcfc9c7904b62163e
1 #include <stdio.h>
2 #include "server_interceptor.h"
4 const IOP::ServiceId service_id = 0xdeadbeef;
5 const char *request_msg = "12345678";
8 Echo_Server_Request_Interceptor::Echo_Server_Request_Interceptor (void)
9 : myname_ ("Echo_Server_Interceptor")
13 Echo_Server_Request_Interceptor::~Echo_Server_Request_Interceptor (void)
17 char *
18 Echo_Server_Request_Interceptor::name (void)
20 return CORBA::string_dup (this->myname_);
23 void
24 Echo_Server_Request_Interceptor::destroy (void)
28 void
29 Echo_Server_Request_Interceptor::receive_request_service_contexts (
30 PortableInterceptor::ServerRequestInfo_ptr ri)
33 CORBA::String_var operation = ri->operation ();
35 printf("%s.receive_request_service_contexts from "
36 "\"%s\"\n",
37 this->myname_,
38 operation.in ());
40 IOP::ServiceId id = ::service_id;
41 IOP::ServiceContext_var sc =
42 ri->get_request_service_context (id);
44 const char *buf =
45 reinterpret_cast<const char *> (sc->context_data.get_buffer ());
46 #if 0
47 ACE_DEBUG ((LM_DEBUG,
48 " Received service context: %C\n",
49 buf));
50 #endif /*if 0*/
52 if (strcmp (buf, request_msg) != 0)
54 printf("ERROR: Echo_Server_Request_Interceptor::receive_request_service_contexts: "
55 "Expected request service context to be: %s\n",
56 request_msg);
57 _exit(1);
63 void
64 Echo_Server_Request_Interceptor::receive_request (
65 PortableInterceptor::ServerRequestInfo_ptr)
67 // Do nothing
70 void
71 Echo_Server_Request_Interceptor::send_reply (
72 PortableInterceptor::ServerRequestInfo_ptr )
76 void
77 Echo_Server_Request_Interceptor::send_exception (
78 PortableInterceptor::ServerRequestInfo_ptr )
82 void
83 Echo_Server_Request_Interceptor::send_other (
84 PortableInterceptor::ServerRequestInfo_ptr)