summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2014-05-02 14:30:47 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2014-05-02 14:30:47 +0000
commitf765fc9bd8ea895db3efcdf6d62e8b738aacb4f9 (patch)
treee58b6ce2d339970d8ab9fd77cbe414f980a64030
parentd8f38f20fb828bd94ab73364fd2b291b538dafbf (diff)
downloadATCD-f765fc9bd8ea895db3efcdf6d62e8b738aacb4f9.tar.gz
Fri May 2 14:28:06 UTC 2014 Phil Mesnier <mesnier_p@ociweb.com>
* ace/config-macosx-leopard.h: MacOS supports ICMP. * tests/Bug_4055_Regression_Test.cpp: * tests/Message_Block_Large_Copy_Test.cpp: * tests/Monotonic_Message_Queue_Test.cpp: * tests/Network_Adapters_Test.cpp: clean up some valgrind leak reports.
-rw-r--r--ACE/ChangeLog11
-rw-r--r--ACE/ace/config-macosx-leopard.h2
-rw-r--r--ACE/tests/Bug_4055_Regression_Test.cpp11
-rw-r--r--ACE/tests/Message_Block_Large_Copy_Test.cpp8
-rw-r--r--ACE/tests/Monotonic_Message_Queue_Test.cpp10
-rw-r--r--ACE/tests/Network_Adapters_Test.cpp20
6 files changed, 48 insertions, 14 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 169bf2e213d..ce57414d84d 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,14 @@
+Fri May 2 14:28:06 UTC 2014 Phil Mesnier <mesnier_p@ociweb.com>
+
+ * ace/config-macosx-leopard.h:
+ MacOS supports ICMP.
+
+ * tests/Bug_4055_Regression_Test.cpp:
+ * tests/Message_Block_Large_Copy_Test.cpp:
+ * tests/Monotonic_Message_Queue_Test.cpp:
+ * tests/Network_Adapters_Test.cpp:
+ clean up some valgrind leak reports.
+
Tue Apr 29 15:08:45 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* ACE-INSTALL.html:
diff --git a/ACE/ace/config-macosx-leopard.h b/ACE/ace/config-macosx-leopard.h
index eb0bc6e251f..38fc83fd9ab 100644
--- a/ACE/ace/config-macosx-leopard.h
+++ b/ACE/ace/config-macosx-leopard.h
@@ -87,6 +87,8 @@
#define ACE_HAS_AIO_CALLS
+#define ACE_HAS_ICMP_SUPPORT 1
+
//Platform supports sigsuspend()
#define ACE_HAS_SIGSUSPEND
diff --git a/ACE/tests/Bug_4055_Regression_Test.cpp b/ACE/tests/Bug_4055_Regression_Test.cpp
index a0b788737da..2d7ac2989fe 100644
--- a/ACE/tests/Bug_4055_Regression_Test.cpp
+++ b/ACE/tests/Bug_4055_Regression_Test.cpp
@@ -52,7 +52,7 @@ create_timer_queue (void)
class MyTask : public ACE_Task<ACE_MT_SYNCH>
{
public:
- MyTask () : my_reactor_ (0) {}
+ MyTask () : my_reactor_ (0), my_tq_ (0) {}
virtual ~MyTask () { stop (); }
@@ -68,6 +68,7 @@ private:
ACE_SYNCH_RECURSIVE_MUTEX lock_;
ACE_Reactor *my_reactor_;
+ ACE_Timer_Queue *my_tq_;
};
ACE_Reactor*
@@ -86,9 +87,10 @@ MyTask::create_reactor (void)
ACE_TEST_ASSERT (this->my_reactor_ == 0);
- ACE_TP_Reactor * pImpl = 0;
+ this->my_tq_ = create_timer_queue ();
- ACE_NEW_RETURN (pImpl,ACE_TP_Reactor (0, create_timer_queue ()), -1);
+ ACE_TP_Reactor * pImpl = 0;
+ ACE_NEW_RETURN (pImpl,ACE_TP_Reactor (0, this->my_tq_), -1);
ACE_NEW_RETURN (my_reactor_,
ACE_Reactor (pImpl ,1),
@@ -116,7 +118,8 @@ MyTask::delete_reactor (void)
this->reactor (0);
delete this->my_reactor_;
this->my_reactor_ = 0;
-
+ delete this->my_tq_;
+ this->my_tq_ = 0;
return 0;
}
diff --git a/ACE/tests/Message_Block_Large_Copy_Test.cpp b/ACE/tests/Message_Block_Large_Copy_Test.cpp
index 062ddb34017..5cd4f9c48c7 100644
--- a/ACE/tests/Message_Block_Large_Copy_Test.cpp
+++ b/ACE/tests/Message_Block_Large_Copy_Test.cpp
@@ -29,7 +29,7 @@ run_duplicate_test (const size_t msg_block_count,
for (size_t j = 0; j != msg_block_count; ++j)
{
ACE_Message_Block* next = new ACE_Message_Block (block, msg_block_size);
- next->copy (block);
+ next->wr_ptr (msg_block_size);
mb->cont (next);
mb = next;
}
@@ -70,7 +70,7 @@ run_clone_test (const size_t msg_block_count,
for (size_t j = 0; j != msg_block_count; ++j)
{
ACE_Message_Block* next = new ACE_Message_Block (block, msg_block_size);
- next->copy (block);
+ next->wr_ptr (msg_block_size);
mb->cont (next);
mb = next;
}
@@ -119,9 +119,7 @@ run_main (int , ACE_TCHAR *[])
MSG_BLOCK_TOTAL));
char block[MSG_BLOCK_SIZE];
- for(size_t j = 0 ; j != MSG_BLOCK_SIZE; j++)
- block[j] = 'A';
- block[MSG_BLOCK_SIZE-1] = 0;
+ memset (block, 'A', MSG_BLOCK_SIZE);
size_t duplicate_total = run_duplicate_test (
MSG_BLOCK_COUNT,
diff --git a/ACE/tests/Monotonic_Message_Queue_Test.cpp b/ACE/tests/Monotonic_Message_Queue_Test.cpp
index 641cb5a0244..357959ec5cf 100644
--- a/ACE/tests/Monotonic_Message_Queue_Test.cpp
+++ b/ACE/tests/Monotonic_Message_Queue_Test.cpp
@@ -66,7 +66,7 @@ create_timer_queue (void)
class MyTask : public ACE_Task<ACE_MT_SYNCH>
{
public:
- MyTask () : my_reactor_ (0) {}
+ MyTask () : my_reactor_ (0), my_tq_ (0) {}
virtual ~MyTask () { stop (); }
@@ -82,6 +82,7 @@ private:
ACE_SYNCH_RECURSIVE_MUTEX lock_;
ACE_Reactor *my_reactor_;
+ ACE_Timer_Queue *my_tq_;
};
ACE_Reactor*
@@ -100,9 +101,11 @@ MyTask::create_reactor (void)
ACE_TEST_ASSERT (this->my_reactor_ == 0);
+ this->my_tq_ = create_timer_queue ();
+
ACE_TP_Reactor * pImpl = 0;
- ACE_NEW_RETURN (pImpl,ACE_TP_Reactor (0, create_timer_queue ()), -1);
+ ACE_NEW_RETURN (pImpl,ACE_TP_Reactor (0, this->my_tq_), -1);
ACE_NEW_RETURN (my_reactor_,
ACE_Reactor (pImpl ,1),
@@ -130,7 +133,8 @@ MyTask::delete_reactor (void)
this->reactor (0);
delete this->my_reactor_;
this->my_reactor_ = 0;
-
+ delete this->my_tq_;
+ this->my_tq_ = 0;
return 0;
}
diff --git a/ACE/tests/Network_Adapters_Test.cpp b/ACE/tests/Network_Adapters_Test.cpp
index 369a1c9d7a6..2b57d2ecad7 100644
--- a/ACE/tests/Network_Adapters_Test.cpp
+++ b/ACE/tests/Network_Adapters_Test.cpp
@@ -1059,8 +1059,7 @@ run_main (int argc, ACE_TCHAR *argv[])
// does *not* copy the timers, it just deletes the existing timer
// queue ....
main_reactor->timer_queue(tq.get());
- // ... the reactor has assumed ownership, release the auto_ptr<> ...
- tq.release();
+ // ... the reactor does not assume ownership
/**
* Stop_Handler's is supposed to stop the activity of all
@@ -1106,6 +1105,11 @@ run_main (int argc, ACE_TCHAR *argv[])
2, // max_attempts_number
local_adapter) == -1)
{
+ delete ping_handler;
+ delete [] ping_status;
+ delete stop_handler;
+ delete main_reactor;
+
// If this process doesn't have privileges to open a raw socket, log
// a warning instead of an error.
if (errno == EPERM || errno == EACCES)
@@ -1137,6 +1141,11 @@ run_main (int argc, ACE_TCHAR *argv[])
ping_status,
2) == -1) // max_attempts_number
{
+ delete ping_handler;
+ delete [] ping_status;
+ delete stop_handler;
+ delete main_reactor;
+
if (errno == EPERM || errno == EACCES)
{
ACE_ERROR ((LM_WARNING,
@@ -1164,6 +1173,13 @@ run_main (int argc, ACE_TCHAR *argv[])
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P|%t) %p\n"),
ACE_TEXT ("main() - repeats_handler->open")));
+
+ delete repeats_handler;
+ delete ping_handler;
+ delete [] ping_status;
+ delete stop_handler;
+ delete main_reactor;
+
ACE_OS::exit (-4);
}