- **status**: review --> fixed
- **Comment**:
commit 0ef8f97d52e1acbaa28880f40ec8e57812289461
Author: Gary Lee <gary....@dektech.com.au>
Date: Tue Mar 26 10:50:52 2019 +1100
osaf: ensure an error is returned if takeover_request fails [#3023]
if we cannot read the result of a takeover_request, ensure we
return an error
---
** [tickets:#3023] osaf: incorrect result from CreateTakeoverRequest**
**Status:** fixed
**Milestone:** 5.19.06
**Created:** Mon Mar 25, 2019 06:36 AM UTC by Gary Lee
**Last Updated:** Tue Mar 26, 2019 02:00 AM UTC
**Owner:** Gary Lee
Noticed a potential issue while browsing the code. If a takeover request is
written, but cannot be read again, CreateTakeoverRequest would still return OK
~~~
diff --git a/src/osaf/consensus/consensus.cc b/src/osaf/consensus/consensus.cc
index cf307b317..480f7d2a0 100644
--- a/src/osaf/consensus/consensus.cc
+++ b/src/osaf/consensus/consensus.cc
@@ -433,6 +433,8 @@ SaAisErrorT Consensus::CreateTakeoverRequest(const
std::string& current_owner,
return rc;
}
+ // in case takeover request cannot be read
+ rc = SA_AIS_ERR_FAILED_OPERATION;
// wait up to max_takeover_retry seconds for request to be answered
retries = 0;
while (retries < max_takeover_retry_) {
~~~
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets