From: <hem...@us...> - 2015-07-13 16:41:21
|
Revision: 7640 http://sourceforge.net/p/openhpi/code/7640 Author: hemanthreddy Date: 2015-07-13 16:41:18 +0000 (Mon, 13 Jul 2015) Log Message: ----------- Fix for the Issue #1884 - RPT for FAN is getting Created even if that FAN resource is Not Installed Modified Paths: -------------- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c Modified: openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c =================================================================== --- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c 2015-07-09 17:11:34 UTC (rev 7639) +++ openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c 2015-07-13 16:41:18 UTC (rev 7640) @@ -964,6 +964,20 @@ if( (fanstatus != NULL) && !strcmp( fanstatus, "Failed")){ failed = SAHPI_TRUE; } + + /** If the FAN is not installed then FAN Status comes as + * "Not installed" or "Unknown", so do not discover this + * resource and skip to next FAN resource. + * <FAN> + * <ZONE VALUE = "System"/> + * <LABEL VALUE = "Fan 1"/> + * <STATUS VALUE = "Not Installed"/> + * <SPEED VALUE = "0" UNIT="Percentage"/> + * </FAN> + **/ + if(!strcmp(fanstatus, "Not Installed")|| !strcmp(fanstatus, "Unknown")){ + fandata->fanflags = ~IR_DISCOVERED; + } /* include the fan location in the text tag */ tagsize = strlen( fandata->label) + Modified: openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c =================================================================== --- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c 2015-07-09 17:11:34 UTC (rev 7639) +++ openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c 2015-07-13 16:41:18 UTC (rev 7640) @@ -1419,7 +1419,9 @@ * DiscoveryData, update DiscoveryData with the latest info */ fandat = &(ir_handler->DiscoveryData.fandata[fanindex]); - fandat->fanflags |= IR_DISCOVERED; + if(strcmp(fanstat, "Not Installed") && strcmp(fanstat, "Unknown")){ + fandat->fanflags |= IR_DISCOVERED; + } speedval = atoi(fanspeed); if( fandat->speed != speedval){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |