diff options
author | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-30 03:04:43 +0000 |
---|---|---|
committer | iliyan <iliyan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2008-03-30 03:04:43 +0000 |
commit | 8f4ac63668d0d23aa45ec6d5b7b52bb899c7f641 (patch) | |
tree | 4c8d3158c5c7cc3f465b6617c0f9aecaceeba14c | |
parent | 4234c0697cd34ee6dfd449e4d9048111ed5be055 (diff) | |
download | ATCD-8f4ac63668d0d23aa45ec6d5b7b52bb899c7f641.tar.gz |
Merged revisions 81151,81153 via svnmerge from
https://svn.dre.vanderbilt.edu/DOC/Middleware/trunk/ACE
........
r81151 | shuston | 2008-03-28 14:50:04 -0500 (Fri, 28 Mar 2008) | 1 line
ChangeLogTag:Fri Mar 28 17:18:50 UTC 2008 Steve Huston <shuston@riverace.com>
........
r81153 | johnnyw | 2008-03-29 03:17:58 -0500 (Sat, 29 Mar 2008) | 1 line
Sat Mar 29 08:16:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl>
........
-rw-r--r-- | ACE/ChangeLog | 22 | ||||
-rw-r--r-- | ACE/THANKS | 1 | ||||
-rw-r--r-- | ACE/ace/CDR_Stream.cpp | 20 | ||||
-rw-r--r-- | ACE/ace/CDR_Stream.h | 3 | ||||
-rw-r--r-- | ACE/ace/Select_Reactor_Base.cpp | 12 | ||||
-rw-r--r-- | ACE/tests/Reactor_Dispatch_Order_Test.cpp | 2 |
6 files changed, 51 insertions, 9 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index 5b8dae96bee..fc433d5c06e 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,25 @@ +Sat Mar 29 08:16:57 UTC 2008 Johnny Willemsen <jwillemsen@remedy.nl> + + * tests/Reactor_Dispatch_Order_Test.cpp: + Dev_Poll reactor displays other bugs, so disable this part of + the test + + * ace/Select_Reactor_Base.cpp: + Position the iterator on the first element that is none zero, fixes + crashing of the reactor_dispatch_order_test on non windows platforms + +Fri Mar 28 17:18:50 UTC 2008 Steve Huston <shuston@riverace.com> + + * ace/CDR_Stream.cpp (write_long_placeholder, write_short_placeholder): + Be careful to adjust and grow the stream's block before taking + the pointer that's returned to the user. Thanks to Alain Kocelniak + <alain@corys.fr> for this fix. + + * ace/CDR_Stream.h: Note that the placeholder methods return 0 if + the method fails due to insufficient memory. + + * THANKS: Added Alain Kocelniak to the Hall of Fame. + Fri Mar 28 15:40:03 UTC 2008 Chad Elliott <elliott_c@ociweb.com> * tests/unload_libace.mpb: diff --git a/ACE/THANKS b/ACE/THANKS index 7750e83d1b4..b2d402e0aab 100644 --- a/ACE/THANKS +++ b/ACE/THANKS @@ -2239,6 +2239,7 @@ Sorin Voicu-Comendant <sorinvc at gmail dot com> Andi Heusser <aheusser at gmail dot com> Paul Carter <pcarter at scires dot com> Michael Carter <mcarter at swri dot org> +Alain Kocelniak <alain at corys dot fr> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson in the early 1990's. Paul devised the recursive Makefile diff --git a/ACE/ace/CDR_Stream.cpp b/ACE/ace/CDR_Stream.cpp index 00af2b70940..ee2a83f987f 100644 --- a/ACE/ace/CDR_Stream.cpp +++ b/ACE/ace/CDR_Stream.cpp @@ -673,20 +673,24 @@ ACE_OutputCDR::write_boolean_array (const ACE_CDR::Boolean* x, char * ACE_OutputCDR::write_long_placeholder (void) { - this->align_write_ptr (ACE_CDR::LONG_SIZE); - char *pos = this->current_->wr_ptr (); - this->write_long (0); - return pos; + char *buf = 0; + if (this->adjust (ACE_CDR::LONG_SIZE, buf) == 0) + *reinterpret_cast<ACE_CDR::ULong*> (buf) = 0; + else + buf = 0; + return buf; } char * ACE_OutputCDR::write_short_placeholder (void) { - this->align_write_ptr (ACE_CDR::SHORT_SIZE); - char *pos = this->current_->wr_ptr(); - this->write_short (0); - return pos; + char *buf = 0; + if (this->adjust (ACE_CDR::SHORT_SIZE, buf) == 0) + *reinterpret_cast<ACE_CDR::UShort*> (buf) = 0; + else + buf = 0; + return buf; } diff --git a/ACE/ace/CDR_Stream.h b/ACE/ace/CDR_Stream.h index 58ddea442ed..6be610ff132 100644 --- a/ACE/ace/CDR_Stream.h +++ b/ACE/ace/CDR_Stream.h @@ -301,6 +301,9 @@ public: * replace (). * These methods align the stream's write pointer properly prior to * writing the placeholder. + * + * @retval Pointer to the placeholder; 0 if there is not enough space + * in the stream and memory could not be allocated. */ char* write_long_placeholder (void); char* write_short_placeholder (void); diff --git a/ACE/ace/Select_Reactor_Base.cpp b/ACE/ace/Select_Reactor_Base.cpp index 5b40ddfab5b..e86008aaf85 100644 --- a/ACE/ace/Select_Reactor_Base.cpp +++ b/ACE/ace/Select_Reactor_Base.cpp @@ -411,6 +411,18 @@ ACE_Select_Reactor_Handler_Repository_Iterator::ACE_Select_Reactor_Handler_Repos : rep_ (s), current_ (s->event_handlers_.begin ()) { +#ifndef ACE_WIN32 + // Don't use ACE_Array_Base::end() since it may be larger than + // event_handlers[max_handlep1_]. + const_base_iterator const end = + &this->rep_->event_handlers_[this->rep_->max_handlep1 ()]; + + // Advance to the next element containing a non-zero event handler. + // There's no need to do this for the Windows case since the hash + // map will only contain non-zero event handlers. + while (this->current_ != end && (*(this->current_) == 0)) + ++this->current_; +#endif } // Pass back the <next_item> that hasn't been seen in the Set. diff --git a/ACE/tests/Reactor_Dispatch_Order_Test.cpp b/ACE/tests/Reactor_Dispatch_Order_Test.cpp index 10d68a4f402..d6098bd7b2e 100644 --- a/ACE/tests/Reactor_Dispatch_Order_Test.cpp +++ b/ACE/tests/Reactor_Dispatch_Order_Test.cpp @@ -270,7 +270,7 @@ run_main (int, ACE_TCHAR *[]) #endif /* ACE_WIN32 && ACE_HAS_WINSOCK2 */ -#if defined (ACE_HAS_EVENT_POLL) +#if 0 ACE_Dev_Poll_Reactor dev_poll_reactor_impl; ACE_Reactor dev_poll_reactor (&dev_poll_reactor_impl); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing Dev Poll Reactor\n"))); |