diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-03-15 14:47:37 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-03-15 14:47:37 +0000 |
commit | 7ab0cd4f07e54b5ad7fe9fffdb52c4d5d4069e0d (patch) | |
tree | fa2e23725cd0494fe41f7cc2d120e6ba08261e25 | |
parent | a47d95be5eab83a0e6e4055a34062d3371ca129d (diff) | |
download | ATCD-7ab0cd4f07e54b5ad7fe9fffdb52c4d5d4069e0d.tar.gz |
Thu Mar 15 14:44:21 UTC 2007 Carlos O'Ryan <coryan@atdesk.com>
-rw-r--r-- | ACE/ChangeLog | 8 | ||||
-rw-r--r-- | ACE/ace/Select_Reactor_Base.cpp | 24 |
2 files changed, 22 insertions, 10 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog index df2fba9e9fb..09ec872a792 100644 --- a/ACE/ChangeLog +++ b/ACE/ChangeLog @@ -1,3 +1,11 @@ +Thu Mar 15 14:44:21 UTC 2007 Carlos O'Ryan <coryan@atdesk.com> + + * ace/Select_Reactor_Base.cpp: + The close() operation was trying to read from the notification + pipe event if the notification pipe was not open. I did not + notice this could happen, but the reactor constructor has a flag + for it. + Thu Mar 15 12:06:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> Reverted the change below, the test stats show that after adding diff --git a/ACE/ace/Select_Reactor_Base.cpp b/ACE/ace/Select_Reactor_Base.cpp index 35896b41c09..c7c6efd20f2 100644 --- a/ACE/ace/Select_Reactor_Base.cpp +++ b/ACE/ace/Select_Reactor_Base.cpp @@ -641,17 +641,21 @@ ACE_Select_Reactor_Notify::close (void) #if defined (ACE_HAS_REACTOR_NOTIFICATION_QUEUE) notification_queue_.reset(); #else - // Please see Bug 2820, if we just close the pipe then we break the - // reference counting rules. Basically, all the event handlers - // "stored" in the pipe had their reference counts increased. We - // need to decrease them before closing the pipe.... - ACE_Notification_Buffer b; - for (int r = read_notify_pipe(notification_pipe_.read_handle(), b); - r > 0; - r = read_notify_pipe(notification_pipe_.read_handle(), b)) + if (this->notification_pipe_.read_handle() != ACE_INVALID_HANDLE) { - if (b.eh_ == 0) continue; - b.eh_->remove_reference(); + // Please see Bug 2820, if we just close the pipe then we break + // the reference counting rules. Basically, all the event + // handlers "stored" in the pipe had their reference counts + // increased. We need to decrease them before closing the + // pipe.... + ACE_Notification_Buffer b; + for (int r = read_notify_pipe(notification_pipe_.read_handle(), b); + r > 0; + r = read_notify_pipe(notification_pipe_.read_handle(), b)) + { + if (b.eh_ == 0) continue; + b.eh_->remove_reference(); + } } #endif /* ACE_HAS_REACTOR_NOTIFICATION_QUEUE */ |