Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1792 snmp_bc_set_hotswap_state() has a likely wrong test

open
nobody
5
2013-05-22
2013-05-22
No

--- a/openhpi/trunk/plugins/snmp_bc/snmp_bc_hotswap.c
+++ b/openhpi/trunk/plugins/snmp_bc/snmp_bc_hotswap.c
@@ -140,7 +140,7 @@ SaErrorT snmp_bc_set_hotswap_state(void *hnd,
return(SA_ERR_HPI_INTERNAL_ERROR);
}

- if (resinfo->cur_state != SAHPI_HS_STATE_INSERTION_PENDING ||
+ if (resinfo->cur_state != SAHPI_HS_STATE_INSERTION_PENDING &&
resinfo->cur_state != SAHPI_HS_STATE_EXTRACTION_PENDING) {
snmp_bc_unlock_handler(custom_handle);
return(SA_ERR_HPI_INVALID_REQUEST);

Discussion