blob: d03c97e186f270e873a770dd82dd4fe80294b8c3 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001Upstream-Status: Submitted
2
3Package saftest run a test case to pass invalid session id to function
4saHpiResourceIdGet that expect return SA_ERR_HPI_INVALID_SESSION. But the check
5for SA_ERR_HPI_INVALID_SESSION is missed somehow in function saHpiResourceIdGet.
6
7Add check for SA_ERR_HPI_INVALID_SESSION.
8
9Signed-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 }