summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-07-29 16:02:48 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-07-29 16:02:48 +0000
commit743924e0b9854fbc2b0734f5dfa2b009d1c3384c (patch)
tree5e12418e0717605eeefdb4781e3c8f611eddf9cb
parent1cb94a96823ee140e0ea072b60ac9f1c06d762c3 (diff)
downloadATCD-743924e0b9854fbc2b0734f5dfa2b009d1c3384c.tar.gz
ChangeLogTag:Sun Jul 29 09:00:57 2001 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a5
-rw-r--r--TAO/tao/LF_Event.cpp16
2 files changed, 16 insertions, 5 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 5dfee1e87fd..b23082f12cb 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,8 @@
+Sun Jul 29 09:00:57 2001 Carlos O'Ryan <coryan@uci.edu>
+
+ * tao/LF_Event.cpp:
+ Fixed the error_detected() function
+
Fri Jul 27 17:34:40 2001 Carlos O'Ryan <coryan@cs.wustl.edu>
* tao/Leader_Follower.h:
diff --git a/TAO/tao/LF_Event.cpp b/TAO/tao/LF_Event.cpp
index c581aa73a55..4c9ef12d550 100644
--- a/TAO/tao/LF_Event.cpp
+++ b/TAO/tao/LF_Event.cpp
@@ -59,10 +59,16 @@ TAO_LF_Event::state_changed_i (int new_state)
else if (this->state_ == TAO_LF_Event::LFS_ACTIVE)
{
// From LFS_ACTIVE we can only move to a few states
- if (new_state != TAO_LF_Event::LFS_IDLE
- && new_state != TAO_LF_Event::LFS_CONNECTION_CLOSED)
+ if (new_state != TAO_LF_Event::LFS_IDLE)
{
- this->state_ = new_state;
+ if (new_state == TAO_LF_Event::LFS_CONNECTION_CLOSED)
+ {
+ this->state_ = TAO_LF_Event::LFS_FAILURE;
+ }
+ else
+ {
+ this->state_ = new_state;
+ }
}
return;
}
@@ -93,6 +99,6 @@ int
TAO_LF_Event::error_detected (void) const
{
return (this->state_ == TAO_LF_Event::LFS_FAILURE
- && this->state_ == TAO_LF_Event::LFS_TIMEOUT
- && this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED);
+ || this->state_ == TAO_LF_Event::LFS_TIMEOUT
+ || this->state_ == TAO_LF_Event::LFS_CONNECTION_CLOSED);
}