Bug 1670 - _is_a never send responses for AMH-based servants
Summary: _is_a never send responses for AMH-based servants
Status: RESOLVED FIXED
Alias: None
Product: TAO
Classification: Unclassified
Component: IDL Compiler (show other bugs)
Version: 1.3.5
Hardware: All All
: P3 normal
Assignee: Jeff Parsons
URL:
Depends on:
Blocks: 1638
  Show dependency tree
 
Reported: 2003-12-10 14:43 CST by Carlos O'Ryan
Modified: 2003-12-11 14:17 CST (History)
0 users

See Also:


Attachments
Suggested patches (4.96 KB, patch)
2003-12-10 14:50 CST, Carlos O'Ryan
Details
The regression test as a tar file (50.00 KB, application/octet-stream)
2003-12-10 14:53 CST, Carlos O'Ryan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos O'Ryan 2003-12-10 14:43:43 CST
The generated code for _is_a_skel, _non_existant_skel and similar functions
create a response but do not send it for AMH-based servants.  The problem is
that the generated code is assuming that it is called from
synchronous_upcall_dispatch(), but it is in fact called from
asynchronous_upcall_dispatch().

The simplest solution is to generate an explicit call to tao_send_reply(), as is
done in the attachment that will follow shortly.
Comment 1 Carlos O'Ryan 2003-12-10 14:50:51 CST
Created attachment 246 [details]
Suggested patches
Comment 2 Carlos O'Ryan 2003-12-10 14:53:02 CST
Created attachment 247 [details]
The regression test as a tar file
Comment 3 Jeff Parsons 2003-12-11 14:17:05 CST
Thu Dec 11 14:03:16 2003  Jeff Parsons <j.parsons@vanderbilt.edu>

        * TAO_IDL/be/be_visitor_interface/amh_ss.cpp:
        * TAO_IDL/be/be_visitor_interface/interface_ss.cpp:
        * TAO_IDL/be_include/be_visitor_interface/amh_ss.h:
        * TAO_IDL/be_include/be_visitor_interface/interface_ss.h:

          Added virtual method to the be_visitor_interface_ss visitor called
          genrerate_send_reply, which is a no-op, but when overridden
          in the be_visitor_amh_interface_ss visitor, generates an explicit
          send_reply call on _tao_server_request. This new method is then 
          used in the generation of the _is_a_skel, _nonexistent_skel,
          _interface_skel, and _component_skel methods, and the explicit
          send_reply call gets generated for the AMH version of the
          interface. This addition was needed because the above generated
          methods need a reply to be sent right away, and this is not
          handled under the hood in asynchronous_upcall_dispatch() as it
          is in synchronous_upcall_dispatch(). This fix closes
          http://deuce.doc.wustl.edu/bugzilla/﷒0﷓. Thanks
          to Carlos O'Ryan <coryan@atdesk.com> for pointing out the
          problem and suggesting the fix.