Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-1220

TProcessor::process never returns false

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.6
    • 0.7
    • C++ - Compiler
    • None
    • Ubuntu 11.04, Thrift trunk.

    • Patch Available

    Description

      The signature of TProcessor::process is

        virtual bool process(boost::shared_ptr<protocol::TProtocol> in,
                             boost::shared_ptr<protocol::TProtocol> out,
                             void* connectionContext) = 0;
      

      Presumably, the return value is supposed to indicate success or failure. Unfortunately the generated C++ code always returns true, even when there are errors. For instance, if an RPC call is received but no matching function exists, we return a TException in the response but the 'process' method still returns true.

      The attached patch makes the return values useful.

      Attachments

        1. THRIFT-1120.patch
          1 kB
          Diwaker Gupta

        Activity

          People

            diwaker Diwaker Gupta
            diwaker Diwaker Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: