Skip to content

Commit

Permalink
Merge pull request #709 from jwillemsen/jwi-constexceptiondata
Browse files Browse the repository at this point in the history
Use const exception data pointer when using invoke, not changed by th…
  • Loading branch information
jwillemsen authored Sep 16, 2018
2 parents 06f7c45 + 53b3dd4 commit 7bb903f
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 26 deletions.
1 change: 0 additions & 1 deletion TAO/orbsvcs/orbsvcs/SSLIOP/params_dup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <openssl/asn1.h>


DSA *
DSAPARAMS_DUP_WRAPPER_NAME (DSA * dsa)
{
Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/DynamicInterface/DII_Invocation_Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace TAO
}

void
DII_Invocation_Adapter::invoke (TAO::Exception_Data * /*ex_data*/,
DII_Invocation_Adapter::invoke (const TAO::Exception_Data * /*ex_data*/,
unsigned long ex_count)
{
// Convert DII exception list to a form the invocation can use
Expand Down Expand Up @@ -174,7 +174,7 @@ namespace TAO

void
DII_Deferred_Invocation_Adapter::invoke (
TAO::Exception_Data *ex,
const TAO::Exception_Data *ex,
unsigned long ex_count)
{
// New reply dispatcher on the heap, because we will go out of
Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/DynamicInterface/DII_Invocation_Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace TAO
virtual ~DII_Invocation_Adapter (void);

/// Invoke the target
virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
virtual void invoke (const TAO::Exception_Data *ex, unsigned long ex_count);

protected:

Expand Down Expand Up @@ -147,7 +147,7 @@ namespace TAO
TAO::Invocation_Mode mode = TAO_DII_DEFERRED_INVOCATION);

/// Invoke the target
virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
virtual void invoke (const TAO::Exception_Data *ex, unsigned long ex_count);

protected:
virtual Invocation_Status invoke_twoway (
Expand Down
2 changes: 1 addition & 1 deletion TAO/tao/Invocation_Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace TAO
}

void
Invocation_Adapter::invoke (TAO::Exception_Data *ex_data,
Invocation_Adapter::invoke (const TAO::Exception_Data *ex_data,
unsigned long ex_count)
{
// Should stub object be refcounted here?
Expand Down
2 changes: 1 addition & 1 deletion TAO/tao/Invocation_Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace TAO
*
* @param ex_count Number of elements in the array.
*/
virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
virtual void invoke (const TAO::Exception_Data *ex, unsigned long ex_count);

/**
* @param byte_order The intended byte order for the message output
Expand Down
5 changes: 2 additions & 3 deletions TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ namespace TAO

void
Asynch_Invocation_Adapter::invoke (
TAO::Exception_Data *ex,
unsigned long ex_count
)
const TAO::Exception_Data *ex,
unsigned long ex_count)
{
Invocation_Adapter::invoke (ex, ex_count );
}
Expand Down
2 changes: 1 addition & 1 deletion TAO/tao/Messaging/Asynch_Invocation_Adapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace TAO
void invoke (Messaging::ReplyHandler_ptr reply_handler_ptr,
const TAO_Reply_Handler_Stub &reply_handler_stub);

virtual void invoke (TAO::Exception_Data *ex, unsigned long ex_count);
virtual void invoke (const TAO::Exception_Data *ex, unsigned long ex_count);
protected:

virtual Invocation_Status invoke_twoway (
Expand Down
20 changes: 10 additions & 10 deletions TAO/tao/operation_details.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ class TAO_Export TAO_Operation_Details

/// Constructor
TAO_Operation_Details (const char *name,
CORBA::ULong len,
const CORBA::ULong len,
TAO::Argument **args = 0,
CORBA::ULong num_args = 0,
CORBA::Boolean has_in_args = true,
TAO::Exception_Data *ex_data = 0,
CORBA::ULong ex_count = 0);
const CORBA::ULong num_args = 0,
const CORBA::Boolean has_in_args = true,
const TAO::Exception_Data *ex_data = 0,
const CORBA::ULong ex_count = 0);

/// Operation name
const char* opname (void) const;
Expand Down Expand Up @@ -181,7 +181,7 @@ class TAO_Export TAO_Operation_Details
const char *opname_;

/// Precalculated length of opname_.
CORBA::ULong opname_len_;
const CORBA::ULong opname_len_;

/// Request ID of this operation.
CORBA::ULong request_id_;
Expand All @@ -207,16 +207,16 @@ class TAO_Export TAO_Operation_Details
TAO::Argument **args_;

/// Number of arguments including the return value
CORBA::ULong num_args_;
const CORBA::ULong num_args_;

/// A flag indicating any args are sent with the request
CORBA::Boolean has_in_args_;
const CORBA::Boolean has_in_args_;

/// The type of exceptions that the operations can throw.
TAO::Exception_Data *ex_data_;
const TAO::Exception_Data *ex_data_;

/// Count of the exceptions that operations can throw.
CORBA::ULong ex_count_;
const CORBA::ULong ex_count_;

/// Boolean flag to indicate whether in the skeletons the stub arguments
/// stored in these operation details should be used or not.
Expand Down
10 changes: 5 additions & 5 deletions TAO/tao/operation_details.inl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE
TAO_Operation_Details::TAO_Operation_Details (const char *name,
CORBA::ULong len,
const CORBA::ULong len,
TAO::Argument **args,
CORBA::ULong num,
CORBA::Boolean has_in_args,
TAO::Exception_Data *data,
CORBA::ULong count)
const CORBA::ULong num,
const CORBA::Boolean has_in_args,
const TAO::Exception_Data *data,
const CORBA::ULong count)
: opname_ (name)
, opname_len_ (len)
, request_id_ (0)
Expand Down

0 comments on commit 7bb903f

Please sign in to comment.