Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | Upstream-Status: Submitted |
| 2 | |
| 3 | Package saftest run a test case to pass invalid session id to function |
| 4 | saHpiResourceIdGet that expect return SA_ERR_HPI_INVALID_SESSION. But the check |
| 5 | for SA_ERR_HPI_INVALID_SESSION is missed somehow in function saHpiResourceIdGet. |
| 6 | |
| 7 | Add check for SA_ERR_HPI_INVALID_SESSION. |
| 8 | |
| 9 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
| 10 | ----- |
| 11 | --- openhpi-3.4.0/baselib/safhpi.cpp.orig 2014-02-25 10:45:20.911734868 +0800 |
| 12 | +++ openhpi-3.4.0/baselib/safhpi.cpp 2014-02-25 10:46:05.366925389 +0800 |
| 13 | @@ -477,6 +477,8 @@ |
| 14 | &rpt_update_count ); |
| 15 | if ( rv == SA_ERR_HPI_NOT_PRESENT ) { |
| 16 | return SA_ERR_HPI_NOT_PRESENT; |
| 17 | + } else if ( rv == SA_ERR_HPI_INVALID_SESSION) { |
| 18 | + return SA_ERR_HPI_INVALID_SESSION; |
| 19 | } else if ( rv != SA_OK ) { |
| 20 | return SA_ERR_HPI_UNKNOWN; |
| 21 | } |