From: <pg...@us...> - 2009-01-08 09:12:53
|
Revision: 6926 http://openhpi.svn.sourceforge.net/openhpi/?rev=6926&view=rev Author: pgraghu Date: 2009-01-08 09:12:49 +0000 (Thu, 08 Jan 2009) Log Message: ----------- [2493467] Partial info is stored in custom fan inventory field Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2009-01-08 08:32:11 UTC (rev 6925) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2009-01-08 09:12:49 UTC (rev 6926) @@ -4185,12 +4185,12 @@ /* Construct the fan zone number field data */ memset(field_data, 0, OA_SOAP_MAX_FZ_INV_SIZE); if (oa_soap_fz_map_arr[oa_handler->enc_type][slot].secondary_zone) { - snprintf(field_data, 12, "Fan Zone=%d,%d", + snprintf(field_data, 13, "Fan Zone=%d,%d", oa_soap_fz_map_arr[oa_handler->enc_type][slot].zone, oa_soap_fz_map_arr[oa_handler->enc_type][slot]. secondary_zone); } else { - snprintf(field_data, 10, "Fan Zone=%d", + snprintf(field_data, 11, "Fan Zone=%d", oa_soap_fz_map_arr[oa_handler->enc_type][slot].zone); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2009-01-09 18:54:39
|
Revision: 6933 http://openhpi.svn.sourceforge.net/openhpi/?rev=6933&view=rev Author: sutula Date: 2009-01-09 18:54:28 +0000 (Fri, 09 Jan 2009) Log Message: ----------- [2496251] Missing "const" declaration causes compile error Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2009-01-09 07:07:56 UTC (rev 6932) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2009-01-09 18:54:28 UTC (rev 6933) @@ -157,7 +157,7 @@ SaHpiIdrFieldTypeT field_type, const char *data); static void oa_soap_add_inv_fields(struct oa_soap_area *area, - struct oa_soap_field *field_list); + const struct oa_soap_field *field_list); static void oa_soap_add_inv_areas(struct oa_soap_inventory *inventory, SaHpiInt32T resource_type); static SaErrorT oa_soap_build_inv(struct oh_handler_state *oh_handler, @@ -3863,7 +3863,7 @@ * NONE */ static void oa_soap_add_inv_fields(struct oa_soap_area *area, - struct oa_soap_field field_array[]) + const struct oa_soap_field field_array[]) { struct oa_soap_field **field; SaHpiInt32T i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2011-01-20 23:06:16
|
Revision: 7254 http://openhpi.svn.sourceforge.net/openhpi/?rev=7254&view=rev Author: dr_mohan Date: 2011-01-20 23:06:10 +0000 (Thu, 20 Jan 2011) Log Message: ----------- Fix for bugzilla 3117681, Extract romVersion value from bladeStatus to populate Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2011-01-19 23:14:19 UTC (rev 7253) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2011-01-20 23:06:10 UTC (rev 7254) @@ -1668,6 +1668,8 @@ struct oa_soap_handler *oa_handler = NULL; SaHpiResourceIdT resource_id; SaHpiRptEntryT *rpt = NULL; + SaHpiFloat64T fm_version; + SaHpiInt32T major; if (oh_handler == NULL || con == NULL || rdr == NULL || inventory == NULL) { @@ -1807,6 +1809,11 @@ /* Increment the field counter */ local_inventory->info.area_list->idr_area_head. NumFields++; + + /* Store Firmware MajorRev & MinorRev data in rpt */ + fm_version = atof(blade_mp_response.fwVersion); + rpt->ResourceInfo.FirmwareMajorRev = major = floor(fm_version); + rpt->ResourceInfo.FirmwareMinorRev = rintf((fm_version - major) * 100); } } return SA_OK; @@ -2080,16 +2087,22 @@ struct oa_soap_inventory **inventory) { SaErrorT rv = SA_OK; + SaHpiIdrFieldT hpi_field; char interconnect_inv_str[] = INTERCONNECT_INVENTORY_STRING; struct oa_soap_inventory *local_inventory = NULL; struct oa_soap_area *head_area = NULL; SaHpiInt32T add_success_flag = 0; + SaHpiInt32T product_area_success_flag = 0; SaHpiInt32T area_count = 0; struct getInterconnectTrayInfo request; struct interconnectTrayInfo response; struct oa_soap_handler *oa_handler = NULL; SaHpiResourceIdT resource_id; SaHpiRptEntryT *rpt = NULL; + xmlNode *extra_data; + struct extraDataInfo extra_data_info; + SaHpiFloat64T fm_version=0; + SaHpiInt32T major=0; if (oh_handler == NULL || con == NULL || rdr == NULL || inventory == NULL) { @@ -2114,6 +2127,20 @@ return SA_ERR_HPI_INTERNAL_ERROR; } + /* Look out for swmFWVersion */ + fm_version = 0; + major = 0; + extra_data = response.extraData; + while (extra_data) { + soap_getExtraData(extra_data, &extra_data_info); + if (!(strcmp(extra_data_info.name, "swmFWVersion"))) { + fm_version = atof(extra_data_info.value); + major = rintf(fm_version); + break; + } + extra_data = soap_next_node(extra_data); + } + /* Populating the inventory rdr with rpt values for the resource */ rdr->Entity = rpt->ResourceEntity; rdr->RecordId = 0; @@ -2163,6 +2190,7 @@ * area pointer stored as the head node for area list */ if (add_success_flag != SAHPI_FALSE) { + product_area_success_flag = SAHPI_TRUE; (local_inventory->info.idr_info.NumAreas)++; if (area_count == 0) { head_area = local_inventory->info.area_list; @@ -2191,6 +2219,39 @@ local_inventory->info.area_list = head_area; *inventory = local_inventory; + + /* Adding the product version in IDR product area. It is added at + * the end of the field list. + */ + if (product_area_success_flag == SAHPI_TRUE) { + /* Add the product version field if the firmware info + * is available + */ + if (!(strcmp(extra_data_info.name, "swmFWVersion"))) { + memset(&hpi_field, 0, sizeof(SaHpiIdrFieldT)); + hpi_field.AreaId = local_inventory->info.area_list-> + idr_area_head.AreaId; + hpi_field.Type = SAHPI_IDR_FIELDTYPE_PRODUCT_VERSION; + strcpy ((char *)hpi_field.Field.Data, + extra_data_info.value); + + rv = idr_field_add(&(local_inventory->info.area_list + ->field_list), + &hpi_field); + if (rv != SA_OK) { + err("Add idr field failed"); + return rv; + } + + /* Increment the field counter */ + local_inventory->info.area_list->idr_area_head. + NumFields++; + + /* Store Firmware Major/Minor Rev numbers to rpt */ + rpt->ResourceInfo.FirmwareMajorRev = major; + rpt->ResourceInfo.FirmwareMinorRev = rintf((fm_version - major) * 100); + } + } return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <el...@us...> - 2011-09-30 18:02:25
|
Revision: 7360 http://openhpi.svn.sourceforge.net/openhpi/?rev=7360&view=rev Author: elangoc Date: 2011-09-30 18:02:19 +0000 (Fri, 30 Sep 2011) Log Message: ----------- This patch fixes bug ID: 3264695 - Report blade MAC addresses (NICs) information Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2011-09-27 14:31:12 UTC (rev 7359) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2011-09-30 18:02:19 UTC (rev 7360) @@ -1804,6 +1804,8 @@ SaHpiRptEntryT *rpt = NULL; SaHpiFloat64T fm_version; SaHpiInt32T major; + struct bladeNicInfo nic_info; + char *nic_address = NULL; if (oh_handler == NULL || con == NULL || rdr == NULL || inventory == NULL) { @@ -1948,6 +1950,39 @@ rpt->ResourceInfo.FirmwareMajorRev = major = floor(fm_version); rpt->ResourceInfo.FirmwareMinorRev = rintf((fm_version - major) * 100); } + /* Get the Blade NIC information*/ + rv = soap_getBladeInfo(con, + &request, &response); + while (response.nics){ + + soap_getBladeNicInfo(response.nics, &nic_info); + /* Add the custom field if the Nic info + * is available + */ + if (nic_info.port != NULL && nic_info.macAddress != NULL) { + memset(&hpi_field, 0, sizeof(SaHpiIdrFieldT)); + hpi_field.AreaId = local_inventory->info.area_list-> + idr_area_head.AreaId; + hpi_field.Type = SAHPI_IDR_FIELDTYPE_CUSTOM; + rv = asprintf(&nic_address, "%s = %s", nic_info.port, + nic_info.macAddress); + strcpy ((char *)hpi_field.Field.Data, + nic_address); + + rv = idr_field_add(&(local_inventory->info.area_list + ->field_list), + &hpi_field); + if (rv != SA_OK) { + err("Add idr field failed"); + return rv; + } + + /* Increment the field counter */ + local_inventory->info.area_list->idr_area_head. + NumFields++; + } + response.nics = soap_next_node(response.nics); + } } return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <el...@us...> - 2012-04-30 22:34:15
|
Revision: 7422 http://openhpi.svn.sourceforge.net/openhpi/?rev=7422&view=rev Author: elangoc Date: 2012-04-30 22:34:08 +0000 (Mon, 30 Apr 2012) Log Message: ----------- Fix for ID:3522644 Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-04-27 23:36:13 UTC (rev 7421) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-04-30 22:34:08 UTC (rev 7422) @@ -1422,13 +1422,13 @@ err("Add internal area failed"); return rv; } - } - if (add_success_flag != SAHPI_FALSE) { - (local_inventory->info.idr_info.NumAreas)++; - if (area_count == 0) { - head_area = local_inventory->info.area_list; + if (add_success_flag != SAHPI_FALSE) { + (local_inventory->info.idr_info.NumAreas)++; + if (area_count == 0) { + head_area = local_inventory->info.area_list; + } + ++area_count; } - ++area_count; } local_inventory->info.area_list = head_area; *inventory = local_inventory; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <el...@us...> - 2012-06-13 22:08:14
|
Revision: 7469 http://openhpi.svn.sourceforge.net/openhpi/?rev=7469&view=rev Author: elangoc Date: 2012-06-13 22:08:08 +0000 (Wed, 13 Jun 2012) Log Message: ----------- Fix for ID: 3522915 Messages are seen when openhpid is run on c3000 enclosure. Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-06-13 14:54:41 UTC (rev 7468) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-06-13 22:08:08 UTC (rev 7469) @@ -5448,12 +5448,18 @@ else strcpy(field_data, "Shared=FALSE"); - /* Set the fan shared field */ - oa_soap_inv_set_field(inventory->info.area_list, + /* Set the fan shared field + * we don't want to execute this for a c3000 enclosure + * we don't have any fan shared and also we don't have + * area_list created for shared fan + */ + if(oa_handler->enc_type != OA_SOAP_ENC_C3000){ + oa_soap_inv_set_field(inventory->info.area_list, SAHPI_IDR_AREATYPE_OEM, OA_SOAP_INV_FAN_SHARED, field_data); + } /* Construct the fan zone number field data */ memset(field_data, 0, OA_SOAP_MAX_FZ_INV_SIZE); if (oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].secondary_zone) { @@ -5466,12 +5472,17 @@ oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].zone); } - /* Set the shared field */ - oa_soap_inv_set_field(inventory->info.area_list, + /* Set the shared field + * Since we don't have fan zone assigned to each fan + * we don't want to assign/set a fan zone number field + */ + if(oa_handler->enc_type != OA_SOAP_ENC_C3000){ + oa_soap_inv_set_field(inventory->info.area_list, SAHPI_IDR_AREATYPE_OEM, OA_SOAP_INV_FZ_NUM, field_data); - + + } return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2012-07-13 18:16:56
|
Revision: 7479 http://openhpi.svn.sourceforge.net/openhpi/?rev=7479&view=rev Author: hemanthreddy Date: 2012-07-13 18:16:50 +0000 (Fri, 13 Jul 2012) Log Message: ----------- Fix for ID:3520845-Seg fault is seen after switchover after running hpib test Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-07-04 14:15:38 UTC (rev 7478) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-07-13 18:16:50 UTC (rev 7479) @@ -4151,7 +4151,7 @@ * newly created area will be added to end of area list * If the area list is empty then the created area will become head node * (first area) for the area list - * - Area id is will start from 0 and will increment for every new area + * - Area id is will start from 1 and will increment for every new area * added * * Return values: @@ -4184,7 +4184,7 @@ * the area list */ *head_area = local_area; - local_area_id = 0; + local_area_id = 1; } else { /* Area list is not empty, traverse to the end of the list * and add the IDR area @@ -4543,7 +4543,7 @@ * newly created field will be added to end of field list. * If the field list is empty then the created field will become head * node (first field) of the field list - * - Field id is will start from 0 and will increment for every new field + * - Field id is will start from 1 and will increment for every new field * added * * Return values: @@ -4576,7 +4576,7 @@ return SA_ERR_HPI_OUT_OF_MEMORY; } *oa_field = field; - field_id = 0; + field_id = 1; } else { /* Field list is not empty, traverse to the end of the list * and add the IDR field This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2012-07-20 17:27:26
|
Revision: 7484 http://openhpi.svn.sourceforge.net/openhpi/?rev=7484&view=rev Author: hemanthreddy Date: 2012-07-20 17:27:20 +0000 (Fri, 20 Jul 2012) Log Message: ----------- Fix for issue ID:3546395-Double free when a Resource removed Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-07-19 20:40:55 UTC (rev 7483) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2012-07-20 17:27:20 UTC (rev 7484) @@ -5025,7 +5025,6 @@ } g_free(inventory->comment); - g_free(inventory); return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2013-05-21 21:05:31
|
Revision: 7534 http://openhpi.svn.sourceforge.net/openhpi/?rev=7534&view=rev Author: hemanthreddy Date: 2013-05-21 21:05:25 +0000 (Tue, 21 May 2013) Log Message: ----------- Fix for issue ID:3613534 - wrong interconnectTrayPortNumber Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-05-21 20:46:18 UTC (rev 7533) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-05-21 21:05:25 UTC (rev 7534) @@ -2567,7 +2567,7 @@ rv = asprintf(&tmp, "InterconnectTrayPort No. = %s", mezzSlots_slot. - interconnectTrayBayNumber); + interconnectTrayPortNumber); if(rv == -1){ err("Failed to allocate memory for buffer to \ hold InterconnectTrayPort No."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2013-05-21 22:42:09
|
Revision: 7536 http://openhpi.svn.sourceforge.net/openhpi/?rev=7536&view=rev Author: hemanthreddy Date: 2013-05-21 22:42:02 +0000 (Tue, 21 May 2013) Log Message: ----------- Fix for issue ID:3613544 - build_interconnect_inv_rdr() is missing some ret value assig Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-05-21 22:28:02 UTC (rev 7535) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-05-21 22:42:02 UTC (rev 7536) @@ -3336,7 +3336,7 @@ hpi_field.AreaId = local_inventory->info.area_list-> idr_area_head.AreaId; hpi_field.Type = SAHPI_IDR_FIELDTYPE_CUSTOM; - asprintf(&tmp, "InterconnectTrayBay No. = %d", + rv = asprintf(&tmp, "InterconnectTrayBay No. = %d", portmap.interconnectTrayBayNumber); if(rv == -1){ free(tmp); @@ -3366,7 +3366,7 @@ hpi_field.AreaId = local_inventory->info.area_list-> idr_area_head.AreaId; hpi_field.Type = SAHPI_IDR_FIELDTYPE_CUSTOM; - asprintf(&tmp, "portMapStatus = %d",portmap.status); + rv = asprintf(&tmp, "portMapStatus = %d",portmap.status); if(rv == -1){ free(tmp); err("Failed to allocate memory for buffer to \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2013-12-06 22:00:24
|
Revision: 7573 http://sourceforge.net/p/openhpi/code/7573 Author: hemanthreddy Date: 2013-12-06 22:00:21 +0000 (Fri, 06 Dec 2013) Log Message: ----------- Fix for Issue ID: 1817 - Adjust the spaces in inventory fields strings for CPU and FAN Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-12-05 22:08:22 UTC (rev 7572) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2013-12-06 22:00:21 UTC (rev 7573) @@ -2240,7 +2240,7 @@ soap_getBladeCpuInfo(response.cpus, &cpu_info); if (cpu_info.cpuType != NULL && cpu_info.cpuSpeed != 0) { - rv = asprintf(&tmp, " CPU %d = %s, %d MHz", + rv = asprintf(&tmp, "CPU %d = %s, %d MHz", ++cpu_no,cpu_info.cpuType,cpu_info.cpuSpeed); if(rv == -1){ free(tmp); @@ -2250,7 +2250,7 @@ } } else { - rv = asprintf(&tmp, " CPU %d = Not present",++cpu_no); + rv = asprintf(&tmp, "CPU %d = Not present",++cpu_no); if(rv == -1){ free(tmp); err("Failed to allocate memory for buffer to \ @@ -5498,9 +5498,9 @@ slot = fan_info->bayNumber; /* Construct the fan shared field data */ if (oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].shared == SAHPI_TRUE) - strcpy(field_data, "Shared=TRUE"); + strcpy(field_data, "Shared = TRUE"); else - strcpy(field_data, "Shared=FALSE"); + strcpy(field_data, "Shared = FALSE"); /* Set the fan shared field * we don't want to execute this for a c3000 enclosure @@ -5517,12 +5517,12 @@ /* Construct the fan zone number field data */ memset(field_data, 0, OA_SOAP_MAX_FZ_INV_SIZE); if (oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].secondary_zone) { - snprintf(field_data, 13, "Fan Zone=%d,%d", + snprintf(field_data, 15, "Fan Zone = %d,%d", oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].zone, oa_soap_fz_map_arr[oa_handler->enc_type][slot-1]. secondary_zone); } else { - snprintf(field_data, 11, "Fan Zone=%d", + snprintf(field_data, 13, "Fan Zone = %d", oa_soap_fz_map_arr[oa_handler->enc_type][slot-1].zone); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |