summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-08-01 07:38:40 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-08-01 07:38:40 +0000
commit3145b91b98c6539ea772327639fa61ba06d08a2b (patch)
tree2337f9a80c5eba21a33db3702e24203dbb34532b
parent8162310ed72bc90aa3f443af7ecbafdbafbd8dd4 (diff)
downloadATCD-3145b91b98c6539ea772327639fa61ba06d08a2b.tar.gz
Wed Aug 1 07:38:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/tao/Asynch_Queued_Message.cpp16
-rw-r--r--TAO/tao/Asynch_Queued_Message.h7
-rw-r--r--TAO/tao/ORB_Core.cpp12
-rw-r--r--TAO/tao/Queued_Message.h6
-rw-r--r--TAO/tao/Synch_Queued_Message.cpp10
6 files changed, 35 insertions, 28 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 2097ad3d74b..91a0f0fb206 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Wed Aug 1 07:38:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tao/ORB_Core.cpp:
+ Replaced ACE_LIB_TEXT with ACE_TEXT
+
+ * tao/Asynch_Queued_Message.cpp:
+ * tao/Asynch_Queued_Message.h:
+ * tao/Queued_Message.h:
+ * tao/Synch_Queued_Message.cpp:
+ Made the heap allocated flag const and pass it to all constructors
+ so that we don't have to set if after creating the qm.
+
Wed Aug 1 07:34:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
* orbsvcs/examples/CosEC/TypedSimple/Consumer.cpp:
diff --git a/TAO/tao/Asynch_Queued_Message.cpp b/TAO/tao/Asynch_Queued_Message.cpp
index d825be457a3..c0933bc659c 100644
--- a/TAO/tao/Asynch_Queued_Message.cpp
+++ b/TAO/tao/Asynch_Queued_Message.cpp
@@ -48,8 +48,9 @@ TAO_Asynch_Queued_Message::TAO_Asynch_Queued_Message (char *buf,
TAO_ORB_Core *oc,
size_t size,
const ACE_Time_Value &abs_timeout,
- ACE_Allocator *alloc)
- : TAO_Queued_Message (oc, alloc, 0)
+ ACE_Allocator *alloc,
+ bool is_heap_allocated)
+ : TAO_Queued_Message (oc, alloc, is_heap_allocated)
, size_ (size)
, offset_ (0)
, buffer_ (buf)
@@ -140,7 +141,8 @@ TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc)
this->orb_core_,
sz,
this->abs_timeout_,
- alloc),
+ alloc,
+ true),
0);
}
else
@@ -158,14 +160,12 @@ TAO_Asynch_Queued_Message::clone (ACE_Allocator *alloc)
TAO_Asynch_Queued_Message (buf,
this->orb_core_,
sz,
- this->abs_timeout_),
+ this->abs_timeout_,
+ 0,
+ true),
0);
}
- // Set the flag to indicate that <qm> is created on the heap.
- if (qm)
- qm->is_heap_created_ = true;
-
return qm;
}
diff --git a/TAO/tao/Asynch_Queued_Message.h b/TAO/tao/Asynch_Queued_Message.h
index 3840a4c8535..2f3c9af95db 100644
--- a/TAO/tao/Asynch_Queued_Message.h
+++ b/TAO/tao/Asynch_Queued_Message.h
@@ -56,8 +56,8 @@ public:
TAO_Asynch_Queued_Message (const ACE_Message_Block *contents,
TAO_ORB_Core *oc,
ACE_Time_Value *timeout,
- ACE_Allocator *alloc = 0,
- bool is_heap_allocated = false);
+ ACE_Allocator *alloc,
+ bool is_heap_allocated);
/// Destructor
@@ -99,7 +99,8 @@ protected:
TAO_ORB_Core *oc,
size_t size,
const ACE_Time_Value &abs_timeout,
- ACE_Allocator *alloc = 0);
+ ACE_Allocator *alloc,
+ bool is_heap_allocated);
private:
/// The number of bytes in the buffer
size_t const size_;
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index ebf0dbbe3ab..3b1ba436fee 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -517,7 +517,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBKeepalive"))))
+ (ACE_TEXT("-ORBKeepalive"))))
{
// Use SO_KEEPALIVE or not.
so_keepalive =
@@ -526,7 +526,7 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBDontRoute"))))
+ (ACE_TEXT("-ORBDontRoute"))))
{
// Use SO_DONTROUTE or not.
so_dontroute =
@@ -1017,13 +1017,13 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBUseParallelConnects"))))
+ (ACE_TEXT("-ORBUseParallelConnects"))))
{
use_parallel_connects = ACE_OS::atoi (current_arg);
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBParallelConnectDelay"))))
+ (ACE_TEXT("-ORBParallelConnectDelay"))))
{
this->orb_params ()->parallel_connect_delay
(ACE_OS::atoi (current_arg));
@@ -1049,14 +1049,14 @@ TAO_ORB_Core::init (int &argc, char *argv[] )
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBUseLocalMemoryPool"))))
+ (ACE_TEXT("-ORBUseLocalMemoryPool"))))
{
this->use_local_memory_pool_ = (0 != ACE_OS::atoi (current_arg));
arg_shifter.consume_arg ();
}
else if (0 != (current_arg = arg_shifter.get_the_parameter
- (ACE_LIB_TEXT("-ORBMaxMessageSize"))))
+ (ACE_TEXT("-ORBMaxMessageSize"))))
{
this->orb_params_.max_message_size (ACE_OS::atoi (current_arg));
diff --git a/TAO/tao/Queued_Message.h b/TAO/tao/Queued_Message.h
index 051d71d6e2a..ee301886387 100644
--- a/TAO/tao/Queued_Message.h
+++ b/TAO/tao/Queued_Message.h
@@ -77,8 +77,8 @@ class TAO_Export TAO_Queued_Message : public TAO_LF_Invocation_Event
public:
/// Constructor
TAO_Queued_Message (TAO_ORB_Core *oc,
- ACE_Allocator *alloc,
- bool is_heap_allocated);
+ ACE_Allocator *alloc = 0,
+ bool is_heap_allocated = false);
/// Destructor
virtual ~TAO_Queued_Message (void);
@@ -218,7 +218,7 @@ protected:
* A flag to indicate whether @a this is on stack or heap. A true value
* indicates that @a this was created on heap.
*/
- bool is_heap_created_;
+ bool const is_heap_created_;
/// Cached copy of ORB_Core pointer
TAO_ORB_Core *orb_core_;
diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp
index 85d89087e1d..5379cbadf97 100644
--- a/TAO/tao/Synch_Queued_Message.cpp
+++ b/TAO/tao/Synch_Queued_Message.cpp
@@ -130,22 +130,16 @@ TAO_Synch_Queued_Message::clone (ACE_Allocator *alloc)
TAO_Synch_Queued_Message (mb,
this->orb_core_,
alloc,
- 0),
+ true),
0);
}
else
{
ACE_NEW_RETURN (qm,
- TAO_Synch_Queued_Message (mb, this->orb_core_, 0, 0),
+ TAO_Synch_Queued_Message (mb, this->orb_core_, 0, true),
0);
}
- // Set the flag to indicate that <qm> is created on the heap.
- if (qm)
- {
- qm->is_heap_created_ = true;
- }
-
return qm;
}