open-hpi / openhpi

Other
6 stars 10 forks source link

openhpid/safhpi.c: fix function saHpiSensorThresholdsSet #2744

Closed yizhao1 closed 5 years ago

yizhao1 commented 5 years ago

In COPY_TH the SensorThresholds->TH will be copied to tmp.TH only if TH.IsSupported == SAHPI_TRUE. So we should pass &tmp but not SensorThresholds as the argument to OH_CALL_ABI. Otherwise the TH will be set even if TH.IsSupported == SAHPI_FALSE.

Signed-off-by: yanjun.zhu yanjun.zhu@windriver.com Signed-off-by: Yi Zhao yi.zhao@windriver.com

mohandev2 commented 5 years ago

Fixes #2745 saHpiSensorThresholdsSet may set Thresholds even if not supported