From: <sh...@us...> - 2009-01-27 18:41:58
|
Revision: 6943 http://openhpi.svn.sourceforge.net/openhpi/?rev=6943&view=rev Author: shuah Date: 2009-01-27 18:41:54 +0000 (Tue, 27 Jan 2009) Log Message: ----------- Fix for [ 2527902 ] SEG FAULT encountered during the blade event Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_server_event.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_server_event.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_server_event.c 2009-01-25 08:26:47 UTC (rev 6942) +++ openhpi/trunk/plugins/oa_soap/oa_soap_server_event.c 2009-01-27 18:41:54 UTC (rev 6943) @@ -782,8 +782,16 @@ rv = soap_getBladeThermalInfoArray(con, &thermal_request, &thermal_response); - if (rv != SA_OK) { - err("getBladeThermalInfo failed for blade"); + + /* In addition to verifying return value from the soap + * call, check whether the thermal response is NULL, + * partner blade resource might have transitioned to + * degraded state + */ + if ((rv != SA_OK) || + (thermal_response.bladeThermalInfoArray == NULL)) { + err("getBladeThermalInfo failed for blade or" + "the blade is not in stable state"); return; } @@ -864,20 +872,19 @@ thermal_request.bayNumber = bay_number; rv = soap_getBladeThermalInfoArray(con, &thermal_request, &thermal_response); - if (rv != SA_OK) { - err("getBladeThermalInfo failed for blade"); - return; - } - /* Check whether the thermal response is NULL, + /* In addition to verifying return value from the soap call, + * Check whether the thermal response is NULL, * blade resource might have transitioned to POWER-OFF state * during the processing of this event hence resulting in * a NULL response */ - if (thermal_response.bladeThermalInfoArray == NULL) { - dbg("Blade not in stable state to provide sensor info"); + if ((rv != SA_OK) || (thermal_response.bladeThermalInfoArray == NULL)) { + err("getBladeThermalInfo failed for blade or" + "the blade is not in stable state"); return; } + /* Walk through the rdr list of the resource and enable only those * sensor which have the "SensorPresent" value as "true" in * getBladeThermalInfoArray response. Rest of the statically modeled @@ -930,7 +937,7 @@ struct bladeThermalInfo bld_thrm_info; struct extraDataInfo extra_data; - if (oh_handler == NULL || rpt == NULL || thermal_response == NULL) { + if (oh_handler == NULL || rpt == NULL) { err("Invalid parameters"); return SA_ERR_HPI_INVALID_PARAMS; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |