You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(70) |
Jun
(57) |
Jul
(72) |
Aug
(111) |
Sep
(59) |
Oct
(38) |
Nov
(65) |
Dec
(104) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(48) |
Feb
(27) |
Mar
(3) |
Apr
(4) |
May
(36) |
Jun
(21) |
Jul
(7) |
Aug
(25) |
Sep
(33) |
Oct
(24) |
Nov
(27) |
Dec
(19) |
2008 |
Jan
(26) |
Feb
(22) |
Mar
(66) |
Apr
(65) |
May
(28) |
Jun
(5) |
Jul
(26) |
Aug
(5) |
Sep
(6) |
Oct
(25) |
Nov
(17) |
Dec
(6) |
2009 |
Jan
(20) |
Feb
(20) |
Mar
(5) |
Apr
(31) |
May
(6) |
Jun
(4) |
Jul
|
Aug
(3) |
Sep
(2) |
Oct
(6) |
Nov
(8) |
Dec
(2) |
2010 |
Jan
(7) |
Feb
(6) |
Mar
(16) |
Apr
(10) |
May
(11) |
Jun
(37) |
Jul
(14) |
Aug
(5) |
Sep
(9) |
Oct
(10) |
Nov
(25) |
Dec
(55) |
2011 |
Jan
(29) |
Feb
(24) |
Mar
(6) |
Apr
(9) |
May
(16) |
Jun
(19) |
Jul
(4) |
Aug
(4) |
Sep
(15) |
Oct
(15) |
Nov
(8) |
Dec
(4) |
2012 |
Jan
(8) |
Feb
(1) |
Mar
(11) |
Apr
(16) |
May
(25) |
Jun
(28) |
Jul
(10) |
Aug
(25) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(2) |
May
(14) |
Jun
(3) |
Jul
(5) |
Aug
(4) |
Sep
(3) |
Oct
(4) |
Nov
(7) |
Dec
(4) |
2014 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
(2) |
May
|
Jun
(3) |
Jul
(5) |
Aug
(2) |
Sep
(10) |
Oct
(11) |
Nov
(2) |
Dec
(1) |
2015 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(4) |
Jun
(6) |
Jul
(13) |
Aug
(12) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(16) |
May
(16) |
Jun
(6) |
Jul
(3) |
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(1) |
Dec
(4) |
2018 |
Jan
(15) |
Feb
(6) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dr_...@us...> - 2018-03-09 01:43:45
|
Revision: 7758 http://sourceforge.net/p/openhpi/code/7758 Author: dr_mohan Date: 2018-03-09 01:43:41 +0000 (Fri, 09 Mar 2018) Log Message: ----------- Merge 3.8.x branch changes to trunk Modified Paths: -------------- openhpi/trunk/ChangeLog openhpi/trunk/plugins/ov_rest/ov_rest.h openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c openhpi/trunk/plugins/ov_rest/ov_rest_discover.c Property Changed: ---------------- openhpi/trunk/ Index: openhpi/trunk =================================================================== --- openhpi/trunk 2018-03-08 19:24:57 UTC (rev 7757) +++ openhpi/trunk 2018-03-09 01:43:41 UTC (rev 7758) Property changes on: openhpi/trunk ___________________________________________________________________ Modified: svn:mergeinfo ## -1 +1 ## -/openhpi/branches/3.8.x:7743-7747 \ No newline at end of property +/openhpi/branches/3.8.x:7743-7747,7750-7757 \ No newline at end of property Modified: openhpi/trunk/ChangeLog =================================================================== --- openhpi/trunk/ChangeLog 2018-03-08 19:24:57 UTC (rev 7757) +++ openhpi/trunk/ChangeLog 2018-03-09 01:43:41 UTC (rev 7758) @@ -1,3 +1,112 @@ +Changelog for 3.8.0 (03/01/2018) + + New Features + + Fixed Bugs + + Build System + + 1995 - make distcheck fails + + 1978 - Compile fails on glib<2.32 version + + 1976 - Configure error when json-c-devel not included + + 1974 - Remove the warnings from build + + 1968 - Bring in build changes from debian build + + 1967 - SNMP build fails on debian + + HP ProLiant plugin + + 1962 - ilo2_ribcl plugin fails to run against Gen10 + + HP c-Class Plugin + + 1996 - Segmentation fault in oa_soap plugin during resource inventory cleaning + + 1991 - Fix the infinite loop in soap_enum when the string length is 0 + + 1960 - openhpid process is consuming more than 10G + + HPE Synergy plugin + + 1999 - Handle the error code from Synergy composer + + 1990 - ov_rest cert path is not getting created + + 1987 - Alert fields reorder leads to segfault + + 1986 - Increase the X-Api-Version to 600 + + 1985 - Fix compile error in ov_rest_discover.c + + 1984 - handle case DISCOVERY_FAILED in ov_rest_discover_resources + + 1983 - Appliance and Composer resources have few wrong Capabilities + + 1982 - Session id expires if no activity in a day + + 1979 - Do not add Rack Mount Server to Synergy Enclosure + + 1975 - Synergy blade added as rack mount server + + 1964 - Handle important composer events + + 1961 - CRIT messages seen on running openhpid. + + 1959 - Create one RPT per composer + + 1956 - SuSE12 compile warnings - return value not handled + + 1953 - URI field for Synergy composer is missing. + + 1951 - Warning messages see during make on SuSE 12 + + 1950 - CRIT messages could be handled better + + 1946 - Handle task Reset for Interconnects. + + 1945 - Alerts and Tasks not registered + + 1943 - FirmwareMajorRev&FirmwareMinorRev is zero for Synergy Composer and Enclosure. + + 1942 - Manufacturer is missing for Synergy Fan Module and Power Supply. + + 1941 - Product version is null for Enclosures. + + 1937 - oem_event log file needs to be created afresh every time + + HPI Clients + + 1994 - hpipower client gives wrong error message + + HPI Shell + + 1920 - Remove useless addcfg command from hpi_shell + + HPI Utils + + 1980 - Continue with message, if uid_map file creation fails + + IPMI Direct plugin + + 1970 - Replace __STRING + + 1969 - Use PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP if libc defines it + + 1966 - Make the ipmi build to work with gcc-7 + + OpenHPI Daemon + + 1981 - Configure gives an error on RHEL65 + + OpenHPI base library + + 1977 - Coverity Scan detects several issues + + Changelog for 3.7.0 (05/26/2017) New Features Modified: openhpi/trunk/plugins/ov_rest/ov_rest.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest.h 2018-03-08 19:24:57 UTC (rev 7757) +++ openhpi/trunk/plugins/ov_rest/ov_rest.h 2018-03-09 01:43:41 UTC (rev 7758) @@ -148,6 +148,7 @@ SaHpiInt32T max_current_enclosure_count; SaHpiInt32T current_rms_count; SaHpiInt32T max_current_rms_count; + SaHpiInt32T discover_called_count; GHashTable *uri_rid; struct cert { char fCaRoot[15]; Modified: openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-03-08 19:24:57 UTC (rev 7757) +++ openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-03-09 01:43:41 UTC (rev 7758) @@ -300,6 +300,7 @@ struct ov_rest_handler *ov_handler = (struct ov_rest_handler *) handler->data; + ov_handler->discover_called_count = 0; con = (REST_CON *) ov_handler->connection; /* Get the Active OV hostname/IP address and check whether it's NULL */ Modified: openhpi/trunk/plugins/ov_rest/ov_rest_discover.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-03-08 19:24:57 UTC (rev 7757) +++ openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-03-09 01:43:41 UTC (rev 7758) @@ -1552,6 +1552,7 @@ { SaErrorT rv = SA_OK; OV_STRING s = {0}; + const char *ecode = NULL; /* struct timeoutResponse response = {0}; */ /* json_object *timeoutResponse = NULL; */ struct curl_slist *chunk = NULL; @@ -1569,7 +1570,15 @@ ov_rest_prn_json_obj(key, val); if(!strcmp(key,"idleTimeout")) to->timeout = json_object_get_int(val); + if(!strcmp(key,"errorCode")) + ecode = json_object_get_string(val); } + + if (ecode != NULL || to->timeout == 0) { + CRIT("Session error %s or timeout=%d", ecode, to->timeout); + rv = SA_ERR_HPI_INTERNAL_ERROR; + } + wrap_free(s.ptr); ov_rest_wrap_json_object_put(s.jobj); wrap_g_free(ov_handler->connection->url); @@ -1614,6 +1623,7 @@ struct oh_handler_state *handler = NULL; struct ov_rest_handler *ov_handler = NULL; struct idleTimeout sess_timeout = {0}; + static int mtl = 480; /* Max timeout loops 86400000/(1000*60*3) */ handler = (struct oh_handler_state *) oh_handler; ov_handler = (struct ov_rest_handler *) handler->data; @@ -1645,13 +1655,14 @@ } break; case DISCOVERY_FAIL: - err("Re-discovery, after failure, for OneView %s", + err("Re-discovery, after failure, for Synergy %s", ov_handler->connection->hostname); rv = ov_rest_connection_init(handler); - if(rv != SA_OK){ + if(rv != SA_OK) { err("Please check whether the Synergy " "Composer %s is accessible", ov_handler->connection->hostname); + wrap_g_mutex_unlock(ov_handler->mutex); return rv; } rv = ov_rest_re_discover_resources(handler); @@ -1669,15 +1680,29 @@ dbg("Discovery already done"); /* Call a function to keep the session alive */ rv = ov_rest_session_timeout(ov_handler,&sess_timeout); - if ( rv != SA_OK) { - err("Session is Not Alive. No idleTimeout"); - ov_handler->status = DISCOVERY_FAIL; + if (( ov_handler->discover_called_count == 0 ) && + ( sess_timeout.timeout != 0 )) { + mtl = sess_timeout.timeout/(1000*60*3); + dbg("idleTimeout=%d and max loops=%d", + sess_timeout.timeout, mtl); + } + if (( rv == SA_OK ) && + ( ov_handler->discover_called_count < mtl-3 )) { + ov_handler->discover_called_count++; wrap_g_mutex_unlock(ov_handler->mutex); return rv; } - dbg("Session Idle Timeout is %d", sess_timeout.timeout); + rv = ov_rest_connection_init(handler); + if(rv != SA_OK){ + err("Please check whether the Synergy " + "Composer %s is accessible", + ov_handler->connection->hostname); + wrap_g_mutex_unlock(ov_handler->mutex); + return rv; + } wrap_g_mutex_unlock(ov_handler->mutex); - return SA_OK; + return rv; + default: err("Wrong ov_rest handler state %d detected", ov_handler->status); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-08 19:24:59
|
Revision: 7757 http://sourceforge.net/p/openhpi/code/7757 Author: dr_mohan Date: 2018-03-08 19:24:57 +0000 (Thu, 08 Mar 2018) Log Message: ----------- Creating 3.8.0 tag for release Added Paths: ----------- openhpi/tags/3.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-08 19:21:33
|
Revision: 7756 http://sourceforge.net/p/openhpi/code/7756 Author: dr_mohan Date: 2018-03-08 19:21:32 +0000 (Thu, 08 Mar 2018) Log Message: ----------- Remove 3.8.0 to include 1999 Removed Paths: ------------- openhpi/tags/3.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-08 19:01:01
|
Revision: 7755 http://sourceforge.net/p/openhpi/code/7755 Author: dr_mohan Date: 2018-03-08 19:00:59 +0000 (Thu, 08 Mar 2018) Log Message: ----------- Include the new fix for 1999 Modified Paths: -------------- openhpi/branches/3.8.x/ChangeLog Modified: openhpi/branches/3.8.x/ChangeLog =================================================================== --- openhpi/branches/3.8.x/ChangeLog 2018-03-08 17:56:51 UTC (rev 7754) +++ openhpi/branches/3.8.x/ChangeLog 2018-03-08 19:00:59 UTC (rev 7755) @@ -32,6 +32,8 @@ HPE Synergy plugin + 1999 - Handle the error code from Synergy composer + 1990 - ov_rest cert path is not getting created 1987 - Alert fields reorder leads to segfault This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-08 17:56:58
|
Revision: 7754 http://sourceforge.net/p/openhpi/code/7754 Author: dr_mohan Date: 2018-03-08 17:56:51 +0000 (Thu, 08 Mar 2018) Log Message: ----------- Fix for 1999 Handle the error code from Synergy composer Modified Paths: -------------- openhpi/branches/3.8.x/plugins/ov_rest/ov_rest.h openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_callsupport.c openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_discover.c Property Changed: ---------------- openhpi/branches/3.8.x/ Index: openhpi/branches/3.8.x =================================================================== --- openhpi/branches/3.8.x 2018-03-04 21:44:21 UTC (rev 7753) +++ openhpi/branches/3.8.x 2018-03-08 17:56:51 UTC (rev 7754) Property changes on: openhpi/branches/3.8.x ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/openhpi/trunk:7745-7747 \ No newline at end of property Modified: openhpi/branches/3.8.x/plugins/ov_rest/ov_rest.h =================================================================== --- openhpi/branches/3.8.x/plugins/ov_rest/ov_rest.h 2018-03-04 21:44:21 UTC (rev 7753) +++ openhpi/branches/3.8.x/plugins/ov_rest/ov_rest.h 2018-03-08 17:56:51 UTC (rev 7754) @@ -148,6 +148,7 @@ SaHpiInt32T max_current_enclosure_count; SaHpiInt32T current_rms_count; SaHpiInt32T max_current_rms_count; + SaHpiInt32T discover_called_count; GHashTable *uri_rid; struct cert { char fCaRoot[15]; Modified: openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_callsupport.c =================================================================== --- openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_callsupport.c 2018-03-04 21:44:21 UTC (rev 7753) +++ openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_callsupport.c 2018-03-08 17:56:51 UTC (rev 7754) @@ -300,6 +300,7 @@ struct ov_rest_handler *ov_handler = (struct ov_rest_handler *) handler->data; + ov_handler->discover_called_count = 0; con = (REST_CON *) ov_handler->connection; /* Get the Active OV hostname/IP address and check whether it's NULL */ Modified: openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_discover.c =================================================================== --- openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_discover.c 2018-03-04 21:44:21 UTC (rev 7753) +++ openhpi/branches/3.8.x/plugins/ov_rest/ov_rest_discover.c 2018-03-08 17:56:51 UTC (rev 7754) @@ -1552,6 +1552,7 @@ { SaErrorT rv = SA_OK; OV_STRING s = {0}; + const char *ecode = NULL; /* struct timeoutResponse response = {0}; */ /* json_object *timeoutResponse = NULL; */ struct curl_slist *chunk = NULL; @@ -1569,7 +1570,15 @@ ov_rest_prn_json_obj(key, val); if(!strcmp(key,"idleTimeout")) to->timeout = json_object_get_int(val); + if(!strcmp(key,"errorCode")) + ecode = json_object_get_string(val); } + + if (ecode != NULL || to->timeout == 0) { + CRIT("Session error %s or timeout=%d", ecode, to->timeout); + rv = SA_ERR_HPI_INTERNAL_ERROR; + } + wrap_free(s.ptr); ov_rest_wrap_json_object_put(s.jobj); wrap_g_free(ov_handler->connection->url); @@ -1614,6 +1623,7 @@ struct oh_handler_state *handler = NULL; struct ov_rest_handler *ov_handler = NULL; struct idleTimeout sess_timeout = {0}; + static int mtl = 480; /* Max timeout loops 86400000/(1000*60*3) */ handler = (struct oh_handler_state *) oh_handler; ov_handler = (struct ov_rest_handler *) handler->data; @@ -1645,13 +1655,14 @@ } break; case DISCOVERY_FAIL: - err("Re-discovery, after failure, for OneView %s", + err("Re-discovery, after failure, for Synergy %s", ov_handler->connection->hostname); rv = ov_rest_connection_init(handler); - if(rv != SA_OK){ + if(rv != SA_OK) { err("Please check whether the Synergy " "Composer %s is accessible", ov_handler->connection->hostname); + wrap_g_mutex_unlock(ov_handler->mutex); return rv; } rv = ov_rest_re_discover_resources(handler); @@ -1669,15 +1680,29 @@ dbg("Discovery already done"); /* Call a function to keep the session alive */ rv = ov_rest_session_timeout(ov_handler,&sess_timeout); - if ( rv != SA_OK) { - err("Session is Not Alive. No idleTimeout"); - ov_handler->status = DISCOVERY_FAIL; + if (( ov_handler->discover_called_count == 0 ) && + ( sess_timeout.timeout != 0 )) { + mtl = sess_timeout.timeout/(1000*60*3); + dbg("idleTimeout=%d and max loops=%d", + sess_timeout.timeout, mtl); + } + if (( rv == SA_OK ) && + ( ov_handler->discover_called_count < mtl-3 )) { + ov_handler->discover_called_count++; wrap_g_mutex_unlock(ov_handler->mutex); return rv; } - dbg("Session Idle Timeout is %d", sess_timeout.timeout); + rv = ov_rest_connection_init(handler); + if(rv != SA_OK){ + err("Please check whether the Synergy " + "Composer %s is accessible", + ov_handler->connection->hostname); + wrap_g_mutex_unlock(ov_handler->mutex); + return rv; + } wrap_g_mutex_unlock(ov_handler->mutex); - return SA_OK; + return rv; + default: err("Wrong ov_rest handler state %d detected", ov_handler->status); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-04 21:44:24
|
Revision: 7753 http://sourceforge.net/p/openhpi/code/7753 Author: dr_mohan Date: 2018-03-04 21:44:21 +0000 (Sun, 04 Mar 2018) Log Message: ----------- Tagging 3.8.0 release Added Paths: ----------- openhpi/tags/3.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-04 21:40:55
|
Revision: 7752 http://sourceforge.net/p/openhpi/code/7752 Author: dr_mohan Date: 2018-03-04 21:40:52 +0000 (Sun, 04 Mar 2018) Log Message: ----------- Removing 3.8.0 tag Removed Paths: ------------- openhpi/tags/3.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-04 20:13:15
|
Revision: 7751 http://sourceforge.net/p/openhpi/code/7751 Author: dr_mohan Date: 2018-03-04 20:13:12 +0000 (Sun, 04 Mar 2018) Log Message: ----------- Tag for 3.8.0 release Added Paths: ----------- openhpi/tags/3.8.0/3.8.x/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-03-04 15:50:04
|
Revision: 7750 http://sourceforge.net/p/openhpi/code/7750 Author: dr_mohan Date: 2018-03-04 15:50:01 +0000 (Sun, 04 Mar 2018) Log Message: ----------- Changelog updated for 3.8.0 release Modified Paths: -------------- openhpi/branches/3.8.x/ChangeLog Modified: openhpi/branches/3.8.x/ChangeLog =================================================================== --- openhpi/branches/3.8.x/ChangeLog 2018-02-27 23:43:59 UTC (rev 7749) +++ openhpi/branches/3.8.x/ChangeLog 2018-03-04 15:50:01 UTC (rev 7750) @@ -1,3 +1,110 @@ +Changelog for 3.8.0 (03/01/2018) + + New Features + + Fixed Bugs + + Build System + + 1995 - make distcheck fails + + 1978 - Compile fails on glib<2.32 version + + 1976 - Configure error when json-c-devel not included + + 1974 - Remove the warnings from build + + 1968 - Bring in build changes from debian build + + 1967 - SNMP build fails on debian + + HP ProLiant plugin + + 1962 - ilo2_ribcl plugin fails to run against Gen10 + + HP c-Class Plugin + + 1996 - Segmentation fault in oa_soap plugin during resource inventory cleaning + + 1991 - Fix the infinite loop in soap_enum when the string length is 0 + + 1960 - openhpid process is consuming more than 10G + + HPE Synergy plugin + + 1990 - ov_rest cert path is not getting created + + 1987 - Alert fields reorder leads to segfault + + 1986 - Increase the X-Api-Version to 600 + + 1985 - Fix compile error in ov_rest_discover.c + + 1984 - handle case DISCOVERY_FAILED in ov_rest_discover_resources + + 1983 - Appliance and Composer resources have few wrong Capabilities + + 1982 - Session id expires if no activity in a day + + 1979 - Do not add Rack Mount Server to Synergy Enclosure + + 1975 - Synergy blade added as rack mount server + + 1964 - Handle important composer events + + 1961 - CRIT messages seen on running openhpid. + + 1959 - Create one RPT per composer + + 1956 - SuSE12 compile warnings - return value not handled + + 1953 - URI field for Synergy composer is missing. + + 1951 - Warning messages see during make on SuSE 12 + + 1950 - CRIT messages could be handled better + + 1946 - Handle task Reset for Interconnects. + + 1945 - Alerts and Tasks not registered + + 1943 - FirmwareMajorRev&FirmwareMinorRev is zero for Synergy Composer and Enclosure. + + 1942 - Manufacturer is missing for Synergy Fan Module and Power Supply. + + 1941 - Product version is null for Enclosures. + + 1937 - oem_event log file needs to be created afresh every time + + HPI Clients + + 1994 - hpipower client gives wrong error message + + HPI Shell + + 1920 - Remove useless addcfg command from hpi_shell + + HPI Utils + + 1980 - Continue with message, if uid_map file creation fails + + IPMI Direct plugin + + 1970 - Replace __STRING + + 1969 - Use PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP if libc defines it + + 1966 - Make the ipmi build to work with gcc-7 + + OpenHPI Daemon + + 1981 - Configure gives an error on RHEL65 + + OpenHPI base library + + 1977 - Coverity Scan detects several issues + + Changelog for 3.7.0 (05/26/2017) New Features This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-02-27 23:44:02
|
Revision: 7749 http://sourceforge.net/p/openhpi/code/7749 Author: dr_mohan Date: 2018-02-27 23:43:59 +0000 (Tue, 27 Feb 2018) Log Message: ----------- Creating 3.8.0 tag for release Added Paths: ----------- openhpi/tags/3.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-02-27 23:41:41
|
Revision: 7748 http://sourceforge.net/p/openhpi/code/7748 Author: dr_mohan Date: 2018-02-27 23:41:37 +0000 (Tue, 27 Feb 2018) Log Message: ----------- Merge 3.8.x branch changes to trunk Modified Paths: -------------- openhpi/trunk/Makefile.am openhpi/trunk/baselib/Makefile.am openhpi/trunk/baselibs/Makefile.am openhpi/trunk/clients/hpipower.c openhpi/trunk/clients/hpixml/Makefile.am openhpi/trunk/configure.ac openhpi/trunk/cpp/Makefile.am openhpi/trunk/hpi_shell/Makefile.am openhpi/trunk/openhpid/Makefile.am openhpi/trunk/plugins/dynamic_simulator/Makefile.am openhpi/trunk/plugins/ilo2_ribcl/Makefile.am openhpi/trunk/plugins/ipmi/Makefile.am openhpi/trunk/plugins/ipmidirect/Makefile.am openhpi/trunk/plugins/oa_soap/Makefile.am openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c openhpi/trunk/plugins/oa_soap/oa_soap_utils.c openhpi/trunk/plugins/slave/Makefile.am openhpi/trunk/plugins/snmp_bc/Makefile.am openhpi/trunk/plugins/snmp_bc/t/Makefile.am openhpi/trunk/plugins/test_agent/Makefile.am openhpi/trunk/plugins/watchdog/Makefile.am openhpi/trunk/scripts/test/Makefile.am openhpi/trunk/ssl/Makefile.am openhpi/trunk/transport/Makefile.am openhpi/trunk/utils/Makefile.am openhpi/trunk/utils/t/ann/Makefile.am openhpi/trunk/utils/t/el/Makefile.am openhpi/trunk/utils/t/uid/Makefile.am Property Changed: ---------------- openhpi/trunk/ Index: openhpi/trunk =================================================================== --- openhpi/trunk 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk 2018-02-27 23:41:37 UTC (rev 7748) Property changes on: openhpi/trunk ___________________________________________________________________ Added: svn:mergeinfo ## -0,0 +1 ## +/openhpi/branches/3.8.x:7743-7747 \ No newline at end of property Modified: openhpi/trunk/Makefile.am =================================================================== --- openhpi/trunk/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -30,8 +30,6 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -ACLOCAL_AMFLAGS = -I m4 - #AUTOMAKE_OPTIONS = 1.8 TARFILE = $(PACKAGE_NAME)-$(VERSION).tar.gz Modified: openhpi/trunk/baselib/Makefile.am =================================================================== --- openhpi/trunk/baselib/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/baselib/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -40,8 +40,7 @@ libopenhpi_la_LDFLAGS = -version-info @HPI_LIB_VERSION@ libopenhpi_la_LIBADD = $(top_builddir)/transport/libopenhpitransport.la -lstdc++ \ $(top_builddir)/marshal/libopenhpimarshal.la \ - $(top_builddir)/utils/libopenhpiutils.la \ - @SSL_LIB@ -lm -lpthread + $(top_builddir)/utils/libopenhpiutils.la clean-local: rm -f *~ core core.* Modified: openhpi/trunk/baselibs/Makefile.am =================================================================== --- openhpi/trunk/baselibs/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/baselibs/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -28,7 +28,6 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -AUTOMAKE_OPTIONS = -Wno-portability EXTRA_DIST = $(srcdir)/README \ $(srcdir)/csharp/Makefile \ Modified: openhpi/trunk/clients/hpipower.c =================================================================== --- openhpi/trunk/clients/hpipower.c 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/clients/hpipower.c 2018-02-27 23:41:37 UTC (rev 7748) @@ -234,11 +234,15 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet", - ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } /* Print out all of the systems */ printf("%2d) %20s - %s \n\r", (Index + 1), @@ -303,10 +307,16 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet",ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } + if (Action == PowerState) { printf("\n%s -- %20s is already powered %s\n",argv[0], @@ -339,11 +349,15 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet", - ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } /* Print out Status for this system */ printf("%2d) %20s - %s \n\r", (ComputerPtr->number + 1), Modified: openhpi/trunk/clients/hpixml/Makefile.am =================================================================== --- openhpi/trunk/clients/hpixml/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/clients/hpixml/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -1,8 +1,6 @@ MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = @TEST_CLEAN@ -AUTOMAKE_OPTIONS = -Wno-portability subdir-objects - AM_CPPFLAGS = -DG_LOG_DOMAIN=\"hpixml\" AM_CCASFLAGS = -DSCHEMA=\"$(srcdir)/schema.xsd\" Modified: openhpi/trunk/configure.ac =================================================================== --- openhpi/trunk/configure.ac 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/configure.ac 2018-02-27 23:41:37 UTC (rev 7748) @@ -8,7 +8,6 @@ AC_INIT(openhpi, 4.0.0) AC_CONFIG_SRCDIR(openhpi.spec.in) AM_INIT_AUTOMAKE([1.8]) -AC_CONFIG_MACRO_DIR([m4]) AM_CONFIG_HEADER(config.h) AH_TOP([#ifndef __OPENHPI_CONFIG_H @@ -114,16 +113,13 @@ fi exact_version=`pkg-config --modversion $GLIB`; -GLIB_CFLAGS=`pkg-config --cflags $GLIB` -GLIB_LIBS=`pkg-config --libs $GLIB` +GLIB_CFLAGS=`pkg-config --cflags $GLIB $GTHREAD` +GLIB_LIBS=`pkg-config --libs $GLIB $GTHREAD` GLIB_ONLY_CFLAGS=`pkg-config --cflags $GLIB` GLIB_ONLY_LIBS=`pkg-config --libs $GLIB` GMODULE_ONLY_CFLAGS=`pkg-config --cflags $GMODULE` GMODULE_ONLY_LIBS=`pkg-config --libs $GMODULE` -GTHREAD_CFLAGS=`pkg-config --cflags $GTHREAD` -GTHREAD_LIBS=`pkg-config --libs $GTHREAD` - # On some versions of Solaris the pkg-config file for gthread-2.0 contains a # compiler option, '-mt', that is incompatible with gcc case $host_os in @@ -156,8 +152,6 @@ AC_SUBST(GLIB_ONLY_LIBS) AC_SUBST(GMODULE_ONLY_CFLAGS) AC_SUBST(GMODULE_ONLY_LIBS) -AC_SUBST(GTHREAD_CFLAGS) -AC_SUBST(GTHREAD_LIBS) AC_CHECK_LIB([sysfs], [sysfs_get_mnt_path], [have_sysfs=yes]) @@ -749,8 +743,7 @@ AC_SUBST(OPENHPI_INCLUDES) dnl Set up libs that will be linked to -dnl old LIBS="$LIBS $SSL_LIB $GLIB_LIBS -lm -lpthread" GTHREAD_LIBS -LIBS="$LIBS $GLIB_LIBS $GTHREAD_LIBS" +LIBS="$LIBS $SSL_LIB $GLIB_LIBS -lm -lpthread" AC_CHECK_PROG([found_pod2man], [pod2man], [yes]) AC_ARG_ENABLE([man], Modified: openhpi/trunk/cpp/Makefile.am =================================================================== --- openhpi/trunk/cpp/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/cpp/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -77,7 +77,7 @@ pkglib_LTLIBRARIES = libosahpi.la -#libosahpi_la_LIBADD = -luuid +libosahpi_la_LIBADD = -luuid libosahpi_la_SOURCES = oSaHpiAlarm.cpp oSaHpiAlarm.hpp \ oSaHpiAnnouncement.cpp oSaHpiAnnouncement.hpp \ oSaHpiAnnunciatorRec.cpp oSaHpiAnnunciatorRec.hpp \ Modified: openhpi/trunk/hpi_shell/Makefile.am =================================================================== --- openhpi/trunk/hpi_shell/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/hpi_shell/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -1,8 +1,6 @@ .NOTPARALLEL: -AUTOMAKE_OPTIONS = -Wno-portability subdir-objects - MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = @TEST_CLEAN@ @@ -16,7 +14,8 @@ -I$(top_srcdir)/marshal \ -I$(top_srcdir)/clients \ -DCLIENT -COMMONLIBS = $(top_builddir)/utils/libopenhpiutils.la \ +COMMONLIBS = $(top_builddir)/transport/libopenhpitransport.la \ + $(top_builddir)/utils/libopenhpiutils.la \ $(top_builddir)/baselib/libopenhpi.la bin_PROGRAMS = hpi_shell Modified: openhpi/trunk/openhpid/Makefile.am =================================================================== --- openhpi/trunk/openhpid/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/openhpid/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -56,7 +56,7 @@ threaded.h libopenhpidaemon_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la \ - @GMODULE_ONLY_LIBS@ -lm -lpthread + @GMODULE_ONLY_LIBS@ if HAVE_OPENSSL libopenhpidaemon_la_LIBADD += $(top_builddir)/$(SSLDIR)/libopenhpi_ssl.la Modified: openhpi/trunk/plugins/dynamic_simulator/Makefile.am =================================================================== --- openhpi/trunk/plugins/dynamic_simulator/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/dynamic_simulator/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -127,7 +127,7 @@ thread.h \ thread.cpp -libdyn_simulator_la_LIBADD = -lm -lpthread -lstdc++ $(top_builddir)/utils/libopenhpiutils.la +libdyn_simulator_la_LIBADD = -lm -lstdc++ $(top_builddir)/utils/libopenhpiutils.la libdyn_simulator_la_LDFLAGS= -module -version-info @HPI_LIB_VERSION@ clean-local: Modified: openhpi/trunk/plugins/ilo2_ribcl/Makefile.am =================================================================== --- openhpi/trunk/plugins/ilo2_ribcl/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/ilo2_ribcl/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -66,7 +66,6 @@ ilo2_ribcl_hotswap.c \ ilo2_ribcl_hotswap.h -libilo2_ribcl_la_LIBADD = @XML2_LIB@ $(top_builddir)/utils/libopenhpiutils.la \ - $(top_builddir)/ssl/libopenhpi_ssl.la +libilo2_ribcl_la_LIBADD = @SSL_LIB@ @XML2_LIB@ $(top_builddir)/utils/libopenhpiutils.la libilo2_ribcl_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ Modified: openhpi/trunk/plugins/ipmi/Makefile.am =================================================================== --- openhpi/trunk/plugins/ipmi/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/ipmi/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -69,6 +69,6 @@ atca_shelf_fru.c \ ipmi.h -libipmi_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la -lOpenIPMI -lOpenIPMIposix +libipmi_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la -lncurses -lOpenIPMI -lOpenIPMIposix @OPENIPMI_LIBS@ #libipmi_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ -export-symbols $(srcdir)/ipmi.sym libipmi_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ -export-dymanic $(srcdir)/ipmi.sym Modified: openhpi/trunk/plugins/ipmidirect/Makefile.am =================================================================== --- openhpi/trunk/plugins/ipmidirect/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/ipmidirect/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -122,7 +122,7 @@ thread.h \ thread.cpp -libipmidirect_la_LIBADD = @CRYPTO_LIB@ -lm -lpthread -lstdc++ $(top_builddir)/utils/libopenhpiutils.la +libipmidirect_la_LIBADD = @CRYPTO_LIB@ -lm -lstdc++ $(top_builddir)/utils/libopenhpiutils.la libipmidirect_la_LDFLAGS= -module -version-info @HPI_LIB_VERSION@ clean-local: Modified: openhpi/trunk/plugins/oa_soap/Makefile.am =================================================================== --- openhpi/trunk/plugins/oa_soap/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/oa_soap/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -96,7 +96,6 @@ oa_soap_callsupport.c # TODO: What about -luuid in the ilo2_ribcl? -liboa_soap_la_LIBADD = @XML2_LIB@ -lm -lpthread \ - $(top_builddir)/utils/libopenhpiutils.la \ - $(top_builddir)/ssl/libopenhpi_ssl.la +liboa_soap_la_LIBADD = @SSL_LIB@ @XML2_LIB@ \ + $(top_builddir)/utils/libopenhpiutils.la liboa_soap_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-02-27 23:41:37 UTC (rev 7748) @@ -6143,7 +6143,6 @@ } wrap_g_free(inventory->comment); - wrap_g_free(inventory); return SA_OK; } Modified: openhpi/trunk/plugins/oa_soap/oa_soap_utils.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_utils.c 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/oa_soap/oa_soap_utils.c 2018-02-27 23:41:37 UTC (rev 7748) @@ -703,7 +703,7 @@ wrap_g_mutex_lock(oa->mutex); rv = soap_getOaStatus(con, &status, &status_response); if (rv != SOAP_OK) { - err("Get OA status call failed"); + err("Get OA status call failed for OA IP %s ", oa->server); wrap_g_mutex_unlock(oa->mutex); return SA_ERR_HPI_INTERNAL_ERROR; } @@ -718,7 +718,7 @@ oa_soap_sleep_in_loop(oa_handler, OA_STABILIZE_MAX_TIME); rv = soap_getOaStatus(con, &status, &status_response); if (rv != SOAP_OK) { - err("Get OA status call failed"); + err("Get OA status call failed for OA IP %s ", oa->server); wrap_g_mutex_unlock(oa->mutex); return SA_ERR_HPI_INTERNAL_ERROR; } Modified: openhpi/trunk/plugins/slave/Makefile.am =================================================================== --- openhpi/trunk/plugins/slave/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/slave/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -36,6 +36,5 @@ util.h libslave_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ -libslave_la_LIBADD = @GMODULE_ONLY_LIBS@ -lm \ - $(top_builddir)/utils/libopenhpiutils.la +libslave_la_LIBADD = @GMODULE_ONLY_LIBS@ Modified: openhpi/trunk/plugins/snmp_bc/Makefile.am =================================================================== --- openhpi/trunk/plugins/snmp_bc/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/snmp_bc/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -83,7 +83,7 @@ snmp_bc_xml2event.c nodist_libsnmp_bc_la_SOURCES = $(GENERATED_EVENT_CODE) -libsnmp_bc_la_LIBADD = -luuid -lnetsnmp $(SNMPUTILBDIR)/libopenhpi_snmp.la $(top_builddir)/utils/libopenhpiutils.la +libsnmp_bc_la_LIBADD = -luuid @SNMPLIBS@ $(SNMPUTILBDIR)/libopenhpi_snmp.la $(top_builddir)/utils/libopenhpiutils.la libsnmp_bc_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ #libsnmp_bc_la_LDFLAGS = -module -avoid-version Modified: openhpi/trunk/plugins/snmp_bc/t/Makefile.am =================================================================== --- openhpi/trunk/plugins/snmp_bc/t/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/snmp_bc/t/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -13,8 +13,6 @@ GENERATED_EVENT_CODE = el2event.c GENERATED_CODE = $(GENERATED_EVENT_XML_MAP) $(GENERATED_EVENT_CODE) -AUTOMAKE_OPTIONS = -Wno-portability - REMOTE_SIM_SOURCES = \ snmp_bc.c \ snmp_bc_annunciator.c \ Modified: openhpi/trunk/plugins/test_agent/Makefile.am =================================================================== --- openhpi/trunk/plugins/test_agent/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/test_agent/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -77,5 +77,5 @@ watchdog.h libtest_agent_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ -libtest_agent_la_LIBADD = -lm -lpthread $(top_builddir)/utils/libopenhpiutils.la +libtest_agent_la_LIBADD = @GMODULE_ONLY_LIBS@ Modified: openhpi/trunk/plugins/watchdog/Makefile.am =================================================================== --- openhpi/trunk/plugins/watchdog/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/plugins/watchdog/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -38,5 +38,5 @@ pkglib_LTLIBRARIES = libwatchdog.la libwatchdog_la_SOURCES = watchdog.c -libwatchdog_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la -lpthread +libwatchdog_la_LIBADD = $(top_builddir)/utils/libopenhpiutils.la libwatchdog_la_LDFLAGS = -module -version-info @HPI_LIB_VERSION@ Modified: openhpi/trunk/scripts/test/Makefile.am =================================================================== --- openhpi/trunk/scripts/test/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/scripts/test/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -29,8 +29,6 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -AUTOMAKE_OPTIONS = -Wno-portability - REPORTDIR = report_html CONFORMDIR = conform_html SERVER = shell1.sf.net Modified: openhpi/trunk/ssl/Makefile.am =================================================================== --- openhpi/trunk/ssl/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/ssl/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -19,6 +19,5 @@ libopenhpi_ssl_la_SOURCES = oh_ssl.c oh_ssl.h libopenhpi_ssl_la_LDFLAGS = -version-info @HPI_LIB_VERSION@ -libopenhpi_ssl_la_LIBADD = @CRYPTO_LIB@ $(top_builddir)/utils/libopenhpiutils.la \ - -lssl -lpthread -lm +libopenhpi_ssl_la_LIBADD = @CRYPTO_LIB@ Modified: openhpi/trunk/transport/Makefile.am =================================================================== --- openhpi/trunk/transport/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/transport/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -22,7 +22,7 @@ AM_CPPFLAGS += @OPENHPI_INCLUDES@ # just to clear LIBS -# LIBS = +LIBS = # marshal and connection used by the daemon and client library lib_LTLIBRARIES = libopenhpitransport.la @@ -32,7 +32,6 @@ strmsock.h libopenhpitransport_la_LDFLAGS= -version-info @HPI_LIB_VERSION@ -# libopenhpitransport_la_LIBADD= @GTHREAD_LIBS@ clean-local: rm -f *~ core core.* Modified: openhpi/trunk/utils/Makefile.am =================================================================== --- openhpi/trunk/utils/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/utils/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -94,7 +94,7 @@ uid_utils.h libopenhpiutils_la_LDFLAGS = -version-info @HPI_LIB_VERSION@ -libopenhpiutils_la_LIBADD = @GCRYPT_LIB@ @SSL_LIB@ -lm -lpthread +libopenhpiutils_la_LIBADD = @GCRYPT_LIB@ # FIXME:: Add when we can auto-generate files for SMP systems #$(GENERATED_FILES): $(top_srcdir)/include/SaHpi.h $(top_srcdir)/scripts/SaHpi2code.pl Modified: openhpi/trunk/utils/t/ann/Makefile.am =================================================================== --- openhpi/trunk/utils/t/ann/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/utils/t/ann/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -8,8 +8,6 @@ # the Copying file included with the OpenHPI distribution for # full licensing terms. -AUTOMAKE_OPTIONS = -Wno-portability - MAINTAINERCLEANFILES = Makefile.in REMOTE_SOURCES = announcement_utils.c \ Modified: openhpi/trunk/utils/t/el/Makefile.am =================================================================== --- openhpi/trunk/utils/t/el/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/utils/t/el/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -10,8 +10,6 @@ MAINTAINERCLEANFILES = Makefile.in -AUTOMAKE_OPTIONS = -Wno-portability - REMOTE_SOURCES = announcement_utils.c \ el_utils.c \ epath_utils.c \ Modified: openhpi/trunk/utils/t/uid/Makefile.am =================================================================== --- openhpi/trunk/utils/t/uid/Makefile.am 2018-02-16 23:26:49 UTC (rev 7747) +++ openhpi/trunk/utils/t/uid/Makefile.am 2018-02-27 23:41:37 UTC (rev 7748) @@ -10,8 +10,6 @@ MAINTAINERCLEANFILES = Makefile.in -AUTOMAKE_OPTIONS = -Wno-portability - REMOTE_SOURCES = uid_utils.c \ epath_utils.c \ sahpi_enum_utils.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-02-16 23:26:53
|
Revision: 7747 http://sourceforge.net/p/openhpi/code/7747 Author: dr_mohan Date: 2018-02-16 23:26:49 +0000 (Fri, 16 Feb 2018) Log Message: ----------- Fix for #1994 hpipower client gives wrong error message Modified Paths: -------------- openhpi/branches/3.8.x/clients/hpipower.c Modified: openhpi/branches/3.8.x/clients/hpipower.c =================================================================== --- openhpi/branches/3.8.x/clients/hpipower.c 2018-02-16 22:37:08 UTC (rev 7746) +++ openhpi/branches/3.8.x/clients/hpipower.c 2018-02-16 23:26:49 UTC (rev 7747) @@ -234,11 +234,15 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet", - ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } /* Print out all of the systems */ printf("%2d) %20s - %s \n\r", (Index + 1), @@ -303,10 +307,16 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet",ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } + if (Action == PowerState) { printf("\n%s -- %20s is already powered %s\n",argv[0], @@ -339,11 +349,15 @@ Status = saHpiResourcePowerStateGet(SessionId, ComputerPtr->ResID, &PowerState); - if (Status != SA_OK) - { - printf("%s does not support PowerStateGet", - ComputerPtr->NameStr); - } + if (Status == SA_ERR_HPI_CAPABILITY ) { + printf("%s does not support PowerStateGet", + ComputerPtr->NameStr); + } else if (Status == SA_ERR_HPI_INVALID_PARAMS ) { + printf("Invalid params in PowerStateGet" ); + } else if (Status != SA_OK) { + printf("%s error. Not in ON or OFF state?", + ComputerPtr->NameStr); + } /* Print out Status for this system */ printf("%2d) %20s - %s \n\r", (ComputerPtr->number + 1), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-02-16 22:37:11
|
Revision: 7746 http://sourceforge.net/p/openhpi/code/7746 Author: hemanthreddy Date: 2018-02-16 22:37:08 +0000 (Fri, 16 Feb 2018) Log Message: ----------- Fix for the issue #1996 Segmentation fault in oa_soap plugin during resource inventory cleaning Modified Paths: -------------- openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_inventory.c openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_utils.c Modified: openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_inventory.c 2018-02-13 23:17:09 UTC (rev 7745) +++ openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_inventory.c 2018-02-16 22:37:08 UTC (rev 7746) @@ -6143,7 +6143,6 @@ } wrap_g_free(inventory->comment); - wrap_g_free(inventory); return SA_OK; } Modified: openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_utils.c =================================================================== --- openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_utils.c 2018-02-13 23:17:09 UTC (rev 7745) +++ openhpi/branches/3.8.x/plugins/oa_soap/oa_soap_utils.c 2018-02-16 22:37:08 UTC (rev 7746) @@ -703,7 +703,7 @@ wrap_g_mutex_lock(oa->mutex); rv = soap_getOaStatus(con, &status, &status_response); if (rv != SOAP_OK) { - err("Get OA status call failed"); + err("Get OA status call failed for OA IP %s ", oa->server); wrap_g_mutex_unlock(oa->mutex); return SA_ERR_HPI_INTERNAL_ERROR; } @@ -718,7 +718,7 @@ oa_soap_sleep_in_loop(oa_handler, OA_STABILIZE_MAX_TIME); rv = soap_getOaStatus(con, &status, &status_response); if (rv != SOAP_OK) { - err("Get OA status call failed"); + err("Get OA status call failed for OA IP %s ", oa->server); wrap_g_mutex_unlock(oa->mutex); return SA_ERR_HPI_INTERNAL_ERROR; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-02-12 19:37:59
|
Revision: 7744 http://sourceforge.net/p/openhpi/code/7744 Author: dr_mohan Date: 2018-02-12 19:37:56 +0000 (Mon, 12 Feb 2018) Log Message: ----------- Incrementing version on trunk after creating 3.8.x branch Modified Paths: -------------- openhpi/trunk/Makefile.mingw32.def openhpi/trunk/baselibs/csharp/openhpi_baselib/AssemblyInfo.cs openhpi/trunk/baselibs/java/openhpi_baselib/manifest.txt openhpi/trunk/baselibs/python/openhpi_baselib/OhpiVersion.py openhpi/trunk/configure.ac Modified: openhpi/trunk/Makefile.mingw32.def =================================================================== --- openhpi/trunk/Makefile.mingw32.def 2018-02-12 19:07:37 UTC (rev 7743) +++ openhpi/trunk/Makefile.mingw32.def 2018-02-12 19:37:56 UTC (rev 7744) @@ -2,9 +2,9 @@ ARCH := x86 #ARCH := amd64 -VERSION := 3.8.0 +VERSION := 4.0.0 # This is for resource compiler -BINARY_VERSION := 3,8,0,0 +BINARY_VERSION := 4,0,0,0 ############################################################################ TOOLCHAIN_PATH := /home/avpak/usr/cross/mingw32 Modified: openhpi/trunk/baselibs/csharp/openhpi_baselib/AssemblyInfo.cs =================================================================== --- openhpi/trunk/baselibs/csharp/openhpi_baselib/AssemblyInfo.cs 2018-02-12 19:07:37 UTC (rev 7743) +++ openhpi/trunk/baselibs/csharp/openhpi_baselib/AssemblyInfo.cs 2018-02-12 19:37:56 UTC (rev 7744) @@ -24,6 +24,6 @@ [assembly: AssemblyTitle( "OpenHPI Base Library For .NET" )] [assembly: AssemblyDescription( "OpenHPI Base Library For .NET" )] [assembly: AssemblyProduct( "OpenHPI" )] -[assembly: AssemblyVersion( "3.8.0.0" )] +[assembly: AssemblyVersion( "4.0.0.0" )] [assembly: AssemblyCulture( "" )] Modified: openhpi/trunk/baselibs/java/openhpi_baselib/manifest.txt =================================================================== --- openhpi/trunk/baselibs/java/openhpi_baselib/manifest.txt 2018-02-12 19:07:37 UTC (rev 7743) +++ openhpi/trunk/baselibs/java/openhpi_baselib/manifest.txt 2018-02-12 19:37:56 UTC (rev 7744) @@ -3,5 +3,5 @@ Implementation-Title: OpenHPI Base Library For Java Implementation-Vendor: openhpi.org Implementation-URL: http://openhpi.org -Implementation-Version: 3.8.0 +Implementation-Version: 4.0.0 Modified: openhpi/trunk/baselibs/python/openhpi_baselib/OhpiVersion.py =================================================================== --- openhpi/trunk/baselibs/python/openhpi_baselib/OhpiVersion.py 2018-02-12 19:07:37 UTC (rev 7743) +++ openhpi/trunk/baselibs/python/openhpi_baselib/OhpiVersion.py 2018-02-12 19:37:56 UTC (rev 7744) @@ -14,5 +14,5 @@ # Anton Pak <ant...@pi...> # -__version_info__ = ( 3, 8, 0 ) +__version_info__ = ( 4, 0, 0 ) Modified: openhpi/trunk/configure.ac =================================================================== --- openhpi/trunk/configure.ac 2018-02-12 19:07:37 UTC (rev 7743) +++ openhpi/trunk/configure.ac 2018-02-12 19:37:56 UTC (rev 7744) @@ -5,7 +5,7 @@ AC_PREREQ(2.57) -AC_INIT(openhpi, 3.8.0) +AC_INIT(openhpi, 4.0.0) AC_CONFIG_SRCDIR(openhpi.spec.in) AM_INIT_AUTOMAKE([1.8]) AC_CONFIG_MACRO_DIR([m4]) @@ -24,7 +24,7 @@ # minor version: 11 = 11 # patch version: 4 = 4 # -HPI_LIB_VERSION=11:0:8 +HPI_LIB_VERSION=4:0:0 HPI_PKG=$PACKAGE_NAME HPI_UTIL_PKG=${PACKAGE_NAME}utils HPI_CLIENT_PKG=${PACKAGE_NAME}client This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-02-12 19:07:38
|
Revision: 7743 http://sourceforge.net/p/openhpi/code/7743 Author: dr_mohan Date: 2018-02-12 19:07:37 +0000 (Mon, 12 Feb 2018) Log Message: ----------- Creating 3.8.x branch Added Paths: ----------- openhpi/branches/3.8.x/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-01-29 19:44:25
|
Revision: 7742 http://sourceforge.net/p/openhpi/code/7742 Author: hemanthreddy Date: 2018-01-29 19:44:24 +0000 (Mon, 29 Jan 2018) Log Message: ----------- Fix for the issue #1991 Fix the infinite loop in soap_enum when the string length is 0 Modified Paths: -------------- openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c Modified: openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c 2018-01-27 02:50:52 UTC (rev 7741) +++ openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c 2018-01-29 19:44:24 UTC (rev 7742) @@ -334,6 +334,9 @@ } len = strlen(value); + if(len == 0){ + return -1; + } /* We have to search repeatedly, in case the match is just a substring * of an enum value. */ Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-01-27 02:50:52 UTC (rev 7741) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-01-29 19:44:24 UTC (rev 7742) @@ -2532,6 +2532,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add product area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2557,6 +2559,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add board area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } if (add_success_flag != SAHPI_FALSE) { @@ -2581,6 +2585,8 @@ &blade_mp_request, &blade_mp_response); if (rv != SOAP_OK) { err("Get blade mp info failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2600,6 +2606,8 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2623,6 +2631,8 @@ blade_mp_response.modelName); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold MP Model name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2638,6 +2648,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2660,6 +2672,8 @@ blade_mp_response.ipAddress); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold MP IP Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2675,6 +2689,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2697,6 +2713,8 @@ blade_mp_response.macAddress); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold MP MAC Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2712,6 +2730,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2734,6 +2754,8 @@ blade_mp_response.dnsName); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold MP DNS name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2749,6 +2771,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2771,6 +2795,8 @@ response->numberOfNics); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold NICs Installed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2786,6 +2812,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2813,6 +2841,8 @@ nic_info.macAddress); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold MAC Address and NIC Port"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2828,6 +2858,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2857,6 +2889,8 @@ err("Failed to allocate memory for buffer to \ hold No. of CPUs"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -2870,6 +2904,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2893,6 +2929,8 @@ ++cpu_no,cpu_info.cpuType,cpu_info.cpuSpeed); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold CPU name and speed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2902,6 +2940,8 @@ rv = asprintf(&tmp, "CPU %d = Not present",++cpu_no); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold Not present CPU Number"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2922,6 +2962,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2948,6 +2990,8 @@ response->memory); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold Memory(RAM) size"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2963,6 +3007,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -2989,6 +3035,8 @@ mezz_info.mezzNumber); if(rv == -1){ wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for \ buffer to hold \ Mezz No."); @@ -3006,6 +3054,8 @@ if (rv != SA_OK) { err("Add idr field failed"); wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -3029,6 +3079,8 @@ local_inventory); if(rv != SA_OK){ err("Add mezz_slot_idr_fields failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } } @@ -3042,6 +3094,8 @@ if(rv != SA_OK){ err("Add mezz_devices_idr_fields \ failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4792,6 +4846,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -4817,6 +4872,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -4902,6 +4958,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -4921,6 +4978,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5007,6 +5065,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5025,6 +5084,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5116,6 +5176,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5136,6 +5197,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5156,6 +5218,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -5177,6 +5240,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_area); return rv; } ++field_count; @@ -6079,6 +6143,7 @@ } wrap_g_free(inventory->comment); + wrap_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: <dr_...@us...> - 2018-01-27 02:50:54
|
Revision: 7741 http://sourceforge.net/p/openhpi/code/7741 Author: dr_mohan Date: 2018-01-27 02:50:52 +0000 (Sat, 27 Jan 2018) Log Message: ----------- Fix for #1945 Alerts and Tasks not registered Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c openhpi/trunk/plugins/ov_rest/ov_rest_event.c openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h Modified: openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-01-26 02:08:49 UTC (rev 7740) +++ openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-01-27 02:50:52 UTC (rev 7741) @@ -493,6 +493,9 @@ } len = strlen(value); + if (len == 0) + return(-1); + /* We have to search repeatedly, in case the match is just a substring * of an enum value. */ Modified: openhpi/trunk/plugins/ov_rest/ov_rest_event.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_event.c 2018-01-26 02:08:49 UTC (rev 7740) +++ openhpi/trunk/plugins/ov_rest/ov_rest_event.c 2018-01-27 02:50:52 UTC (rev 7741) @@ -1017,10 +1017,8 @@ if(event->taskState == NULL){ return SA_ERR_HPI_INVALID_PARAMS; } - CRIT("TASK_ADD for resource category %s ", event->resourceCategory); if ((!strcmp(event->taskState, "Completed")) && (event->percentComplete == 100)) { - CRIT("TASK_ADD COMPLETE for resource category %s ", event->resourceCategory); if(!strcmp(event->resourceCategory, "server-hardware")) { ov_rest_proc_blade_add_complete(oh_handler, event); dbg("TASK_ADD_SERVER"); @@ -2004,7 +2002,8 @@ { ov_rest_json_parse_alerts(scmb_resource, event); - dbg("%s alert received", event->alert_name); + dbg("%s alert received mapped to alertTypeId=%d", event->alert_name, + event->alertTypeId); switch (event->alertTypeId) { case cpqRackServerBladeRemoved2: case BladeRemoved: @@ -2081,9 +2080,8 @@ Critical); dbg("CIManagerCritical"); break; - case CIManagerInserted: - ov_rest_proc_composer_insertion_event(oh_handler, event); + ov_rest_proc_composer_insertion_event(oh_handler,event); dbg("CIManagerInserted"); break; case CIManagerRemoved: @@ -2090,6 +2088,182 @@ ov_rest_proc_composer_removed_event(oh_handler, event); dbg("CIManagerRemoved"); break; + case CommunicationError: + ov_rest_proc_interconnect_fault(oh_handler, + event); + dbg("%s", event->alert_name); + break; + case InterconnectPowerRequestGranted: + case InterconnectManagerICMReadyFault: + case InterconnectManagerICMReadyFaultCleared: + case BladeManagerIloInternalCritical: + case BladeManagerIloInternalCriticalCleared: + case BladeManagerIloInternalWarning: + case BladeManagerIloInternalWarningCleared: + case EmIsActive: + case PowerSupplyInputLossFault: + case invalidTopology: + case neighbourIcPoweredOff16: + case neighbourIcPoweredOff46: + case cxpPortConnected: + case cxpPortMisCabled: + case cxpPortNotConnected: + case CxpPortNotConnectedToExpectedICMKind: + case failedCableRead: + case flexFabric40GbEModuleAtSideANotInFirstEnclosure: + case flexFabric40GbEModuleAtSideBNotInFirstOrSecondEnclosure: + case icNotinSameBaySet: + case InvalidInterconnectKind: + case mixedIcInSameBaySet: + case mixedIcLnSameBaySet: + case moreThanOneflexFabric40GbEModuleAtOneSideofBaySet: + case neighbourIcPoweredOff: + case noflexFabric40GbEModuleAtSideA: + case nonHpeCableInserted: + case PortStatusLinked: + case PortStatusLinkedInvalidPort: + case PortStatusUnlinked: + case unsupportedlc: + case PortStatusLinked1: + case PortStatusLinked2: + case PortStatusLinked4: + case PortStatusUnlinked1: + case PortStatusUnlinked2: + case PortStatusUnlinked4: + case opFcoeActiveChange: + case ilt: + case PowerSupplyInternalCommFault: + case PowerSupplyInternalCommFaultCleared: + case FanElectronicFuseBlownCleared: + case ActivateStagedFirmwareSuccessful: + case BladeCommFault: + case BladeCommFaultCleared: + case BladeFruFault: + case BladeIloOperationalStatusCritical: + case BladeInsertFault: + case BladeInsertFaultCleared: + case BladeManagerICMReadyFault: + case BladeManagerICMReadyFaultCleared: + case BladePowerOn: + case ChassisAmbientThermal: + case ChassisAmbientThermalCleared: + case ChassisUidBlinking: + case CIManagerCommFault: + case CIManagerCommFaultCleared: + case CIManagerEfusePGoodFault: + case CIManagerEfusePGoodFaultCleared: + case CIManagerFruFault: + case CIManagerIloFault: + case CIManagerIloFaultCleared: + case CIManagerIloInternalCritical: + case CIManagerIloInternalCriticalCleared: + case CIManagerIloInternalWarning: + case CIManagerIloInternalWarningCleared: + case CIManagerInsertFault: + case CIManagerInsertFaultCleared: + case EmCommFault: + case EmCommFaultCleared: + case EmDataReplicationFault: + case EmDataReplicationFaultCleared: + case EmFruFault: + case EmInsertFault: + case EmInsertFaultCleared: + case EmOneViewLinkValidationPingAddressMismatch: + case EmOneViewLinkValidationPingAddressMismatch_Cleared: + case EmOneViewLinkValidationPingFailed: + case EmOneViewLinkValidationPingFailed_Cleared: + case EmOneViewLinkValidationPingFailedCleared_PingAddressChanged: + case EmOneViewLinkValidationPingFailedCleared_PingDisabled: + case EmStagedFirmwareUpdated: + case EmSwitchHardwareCritical: + case EmSwitchHardwareOk: + case FanCommFault: + case FanCommFaultCleared: + case FanEfusePGoodFault: + case FanEfusePGoodFaultCleared: + case FanFruFault: + case FanInsertFault: + case FanInsertFaultCleared: + case FanRotor1Fault: + case FanRotor1FaultCleared: + case FanRotor2Fault: + case FanRotor2FaultCleared: + case FrontPanelCommFault: + case FrontPanelCommFaultCleared: + case FrontPanelFruFault: + case FrontPanelInserted: + case FrontPanelInsertFault: + case FrontPanelInsertFaultCleared: + case InterconnectCommFault: + case InterconnectCommFaultCleared: + case InterconnectFruFault: + case InterconnectInsertFault: + case InterconnectInsertFaultCleared: + case InterconnectPowerOff: + case InterconnectPowerOn: + case MidplaneChassisIdUpdated: + case MidplaneFruFault: + case PowerAllocationCollectionChanged: + case PowerAllocationDeleted: + case PowerAllocationPatched: + case PowerAllocationPosted: + case PowerSubsystemOverLimit: + case PowerSubsystemOverLimitCleared: + case PowerSupplyCommFault: + case PowerSupplyCommFaultCleared: + case PowerSupplyFruFault: + case PowerSupplyFruManufacturedForInvalidFault: + case PowerSupplyInputFault: + case PowerSupplyInsertFault: + case PowerSupplyInsertFaultCleared: + case PowerSupplyInterposerCommFault: + case PowerSupplyInterposerCommFaultCleared: + case PowerSupplyInterposerCritical: + case PowerSupplyInterposerDiscoveryComplete: + case PowerSupplyInterposerFruContentFault: + case PowerSupplyInterposerFruFault: + case PowerSupplyInterposerFruManufacturedForInvalidFault: + case PowerSupplyInterposerFruManufacturedForMismatchFault: + case PowerSupplyInterposerInserted: + case PowerSupplyInterposerInsertFault: + case PowerSupplyInterposerInsertFaultCleared: + case PowerSupplyInterposerOk: + case PowerSupplyInterposerPSCommFault: + case PowerSupplyInterposerPSCommFaultCleared: + case PowerSupplyInterposerRemoved: + case PowerSupplyInterposerWarning: + case PowerSupplyIpduInfoChanged: + case PowerSupplyOvertempFault: + case PowerSupplyPowerCycledFault: + case PowerSupplyPsOkFault: + case PowerSupplyReinsertFault: + case PowerSupplyReplaceFault: + case RingNoActiveMgmtPort: + case RingNoActiveMgmtPortCleared: + case RingNoActiveMgmtPortCleared_OwnerChanged: + case RingNoActiveMgmtPort_RingDegraded: + case StagedFirmwareOperationSuccessful: + case BladeRedundantCommFault: + case BladeRedundantCommFaultCleared: + case ChassisEventServiceSubscriptionOverrunFault: + case ChassisEventServiceSubscriptionOverrunFaultCleared: + case ChassisRedundantCommFault: + case ChassisRedundantCommFaultCleared: + case CIManagerRedundantCommFault: + case CiManagerRedundantCommFaultCleared: + case EmHighAssuranceBootCritical: + case EmRedundantCommFault: + case EmRedundantCommFaultCleared: + case FanRedundantCommFault: + case FanRedundantCommFaultCleared: + case FrontPanelRedundantCommFault: + case FrontPanelRedundantCommFaultCleared: + case InterconnectRedundantCommFault: + case InterconnectRedundantCommFaultCleared: + case OneViewServiceEventsCommFault: + case OneViewServiceEventsCommFaultCleared: + case PowerSupplyRedundantCommFault: + case SupplyRedundantCommFaultCleared: case TopologyError: case PartnerSwitchCommunicationFailure: case PartnerSwitchVersionMismatch: @@ -2096,11 +2270,6 @@ case PartnerSwitchWWIDMismatch: case PartnerSwitchNotPresent: case NotConfigured: - case CommunicationError: - ov_rest_proc_interconnect_fault(oh_handler, - event); - dbg("%s", event->alert_name); - break; case cpqRackServerBladeInserted2: case BladeInserted: case cpqRackNetConnectorInserted: @@ -2440,7 +2609,6 @@ case TooManySessions: case UpdateInterrupted: case UpdateSuccessful: - case InterconnectManagerICMReadyFaultCleared: dbg("%s -- Not processed", event->alert_name); break; case OEM_EVENT: @@ -2525,7 +2693,7 @@ dbg("%s -- Not processed", event->task_name); break; default: - err("TASK %s IS NOT REGISTERED", event->task_name); + warn("TASK %s IS NOT REGISTERED", event->task_name); } return; } Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-26 02:08:49 UTC (rev 7740) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-27 02:50:52 UTC (rev 7741) @@ -294,13 +294,14 @@ { char dest[MAX_256_CHARS]; char trimmed_alert[MAX_256_CHARS]; - int j = 0, ret = 0; + int j = 0, ret = 0, scount = 0; if (( alert == NULL ) || (evtinfo == NULL)) { err("Invalid parameters"); return(-1); } - + memset(dest, 0, sizeof(char)*256); + memset(trimmed_alert, 0, sizeof(char)*256); if (strlen(alert) >= 255 ) { err("Alert %s is too long %d",alert, (int)strlen(alert)); strncpy(dest, alert, 255); @@ -309,37 +310,49 @@ strcpy(dest, alert); for (j = 0; dest[j] != '\0'; j++){ - if(dest[j] == '.') + if(dest[j] == '.') { dest[j] = ' '; + scount++; + } } if(!evtinfo->phyResourceType){ - err("physicalResourceType is null for this alert, so setting " + warn("physicalResourceType is null for this alert, so setting " "alertTypeId to OEM_EVENT"); evtinfo->alertTypeId = rest_enum(eventType_S,"OEM_EVENT"); return -1; } - if(!strcmp(evtinfo->phyResourceType, "sas-interconnects")){ - ret = sscanf(dest, "hpris %*s %s %*d", trimmed_alert); - }else{ - ret = sscanf(dest, "hpris %*s %*d %*d %s", trimmed_alert); + + if (strstr(dest, "hpris ")) { + ret = sscanf(dest,"hpris %*s %*d %*d %s",trimmed_alert); + } else if (strstr(dest, "Trap ")) { + ret = sscanf(dest, "Trap %s", trimmed_alert); + } else if (strstr(dest, "crm ")) { + ret = sscanf(dest, "crm %s", trimmed_alert); + } else if (strstr(dest, "swmon ")) { + if (scount == 1) + ret = sscanf(dest, "swmon %s", trimmed_alert); + else if (scount == 2) + ret = sscanf(dest, "swmon %*s %s", trimmed_alert); + else + ret = sscanf(dest, "swmon %s %*s %*s", trimmed_alert); + } else { + warn("alert string: %s is not important as of now", alert); + warn("Setting it as OEM_EVENT to handle generically"); + evtinfo->alertTypeId = rest_enum(eventType_S, "OEM_EVENT"); + return -1; + } - if( ret != 1){ - ret = sscanf(dest , "Trap %s", trimmed_alert); - if(ret !=1){ - ret = sscanf(dest , "crm %s", trimmed_alert); - if(ret != 1){ - ret = sscanf(dest , "swmon %s %*s %*s", - trimmed_alert); - } - if( ret != 1){ - err("Incorrect alertTypeID string: %s", dest); - evtinfo->alertTypeId = rest_enum(eventType_S, - "OEM_EVENT"); - return 1; - } - } - } - evtinfo->alertTypeId = rest_enum(eventType_S, trimmed_alert); + if ( ret != 1 || strlen(trimmed_alert) == 0 ) + evtinfo->alertTypeId = rest_enum(eventType_S, "OEM_EVENT"); + else + evtinfo->alertTypeId = rest_enum(eventType_S, trimmed_alert); + + /* Some alerts are too complex. Make them OEM_EVENTS */ + if ( evtinfo->alertTypeId == -1 ) + evtinfo->alertTypeId = rest_enum(eventType_S, "OEM_EVENT"); + + dbg("alert=%s, trimmed=%s enum=%d",alert, trimmed_alert, + evtinfo->alertTypeId); return ret; } Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-26 02:08:49 UTC (rev 7740) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-27 02:50:52 UTC (rev 7741) @@ -122,39 +122,210 @@ BLADE_TYPE_IO) OV_REST_ENUM(eventType, cpqRackServerBladeInserted2, - BladeInserted, + BladeInserted, cpqRackServerBladeRemoved2, - BladeRemoved, - InterconnectOk, - cpqRackNetConnectorInserted, - InterconnectInserted, - cpqRackNetConnectorRemoved, - InterconnectRemoved, - InterconnectDiscoveryComplete, - cpqDa6AccelStatusChange, - PowerSupplyInserted, - PowerSupplyRemoved, - FanInserted, - FanRemoved, - cpqSm2ServerPowerOn, - cpqSm2ServerPowerOff, - cpqSm2ServerReset, - switchresponse, - HealthStatusArrayCategoryStatus, - coldStart, - linkDown, - linkUp, - TopologyError, - PartnerSwitchCommunicationFailure, - PartnerSwitchVersionMismatch, - PartnerSwitchWWIDMismatch, - PartnerSwitchNotPresent, - NotConfigured, - CommunicationError, - opModeChange, - subPortStatusChange, - linkStateChange, - connectionStateChange, + BladeRemoved, + InterconnectOk, + cpqRackNetConnectorInserted, + InterconnectInserted, + cpqRackNetConnectorRemoved, + InterconnectRemoved, + InterconnectDiscoveryComplete, + cpqDa6AccelStatusChange, + PowerSupplyInserted, + PowerSupplyRemoved, + FanInserted, + FanRemoved, + cpqSm2ServerPowerOn, + cpqSm2ServerPowerOff, + cpqSm2ServerReset, + switchresponse, + HealthStatusArrayCategoryStatus, + InterconnectPowerRequestGranted, + InterconnectManagerICMReadyFault, + InterconnectManagerICMReadyFaultCleared, + BladeManagerIloInternalCritical, + BladeManagerIloInternalCriticalCleared, + BladeManagerIloInternalWarning, + BladeManagerIloInternalWarningCleared, + EmIsActive, + PowerSupplyInputLossFault, + invalidTopology, + neighbourIcPoweredOff16, + neighbourIcPoweredOff46, + cxpPortConnected, + cxpPortMisCabled, + cxpPortNotConnected, + CxpPortNotConnectedToExpectedICMKind, + failedCableRead, + flexFabric40GbEModuleAtSideANotInFirstEnclosure, + flexFabric40GbEModuleAtSideBNotInFirstOrSecondEnclosure, + icNotinSameBaySet, + InvalidInterconnectKind, + mixedIcInSameBaySet, + mixedIcLnSameBaySet, + moreThanOneflexFabric40GbEModuleAtOneSideofBaySet, + neighbourIcPoweredOff, + noflexFabric40GbEModuleAtSideA, + nonHpeCableInserted, + PortStatusLinked, + PortStatusLinkedInvalidPort, + PortStatusUnlinked, + unsupportedlc, + PortStatusLinked1, + PortStatusLinked2, + PortStatusLinked4, + PortStatusUnlinked1, + PortStatusUnlinked2, + PortStatusUnlinked4, + opFcoeActiveChange, + ilt, + PowerSupplyInternalCommFault, + PowerSupplyInternalCommFaultCleared, + FanElectronicFuseBlownCleared, + ActivateStagedFirmwareSuccessful, + BladeCommFault, + BladeCommFaultCleared, + BladeFruFault, + BladeIloOperationalStatusCritical, + BladeInsertFault, + BladeInsertFaultCleared, + BladeManagerICMReadyFault, + BladeManagerICMReadyFaultCleared, + BladePowerOn, + ChassisAmbientThermal, + ChassisAmbientThermalCleared, + ChassisUidBlinking, + CIManagerCommFault, + CIManagerCommFaultCleared, + CIManagerEfusePGoodFault, + CIManagerEfusePGoodFaultCleared, + CIManagerFruFault, + CIManagerIloFault, + CIManagerIloFaultCleared, + CIManagerIloInternalCritical, + CIManagerIloInternalCriticalCleared, + CIManagerIloInternalWarning, + CIManagerIloInternalWarningCleared, + CIManagerInsertFault, + CIManagerInsertFaultCleared, + EmCommFault, + EmCommFaultCleared, + EmDataReplicationFault, + EmDataReplicationFaultCleared, + EmFruFault, + EmInsertFault, + EmInsertFaultCleared, + EmOneViewLinkValidationPingAddressMismatch, + EmOneViewLinkValidationPingAddressMismatch_Cleared, + EmOneViewLinkValidationPingFailed, + EmOneViewLinkValidationPingFailed_Cleared, + EmOneViewLinkValidationPingFailedCleared_PingAddressChanged, + EmOneViewLinkValidationPingFailedCleared_PingDisabled, + EmStagedFirmwareUpdated, + EmSwitchHardwareCritical, + EmSwitchHardwareOk, + FanCommFault, + FanCommFaultCleared, + FanEfusePGoodFault, + FanEfusePGoodFaultCleared, + FanFruFault, + FanInsertFault, + FanInsertFaultCleared, + FanRotor1Fault, + FanRotor1FaultCleared, + FanRotor2Fault, + FanRotor2FaultCleared, + FrontPanelCommFault, + FrontPanelCommFaultCleared, + FrontPanelFruFault, + FrontPanelInserted, + FrontPanelInsertFault, + FrontPanelInsertFaultCleared, + InterconnectCommFault, + InterconnectCommFaultCleared, + InterconnectFruFault, + InterconnectInsertFault, + InterconnectInsertFaultCleared, + InterconnectPowerOff, + InterconnectPowerOn, + MidplaneChassisIdUpdated, + MidplaneFruFault, + PowerAllocationCollectionChanged, + PowerAllocationDeleted, + PowerAllocationPatched, + PowerAllocationPosted, + PowerSubsystemOverLimit, + PowerSubsystemOverLimitCleared, + PowerSupplyCommFault, + PowerSupplyCommFaultCleared, + PowerSupplyFruFault, + PowerSupplyFruManufacturedForInvalidFault, + PowerSupplyInputFault, + PowerSupplyInsertFault, + PowerSupplyInsertFaultCleared, + PowerSupplyInterposerCommFault, + PowerSupplyInterposerCommFaultCleared, + PowerSupplyInterposerCritical, + PowerSupplyInterposerDiscoveryComplete, + PowerSupplyInterposerFruContentFault, + PowerSupplyInterposerFruFault, + PowerSupplyInterposerFruManufacturedForInvalidFault, + PowerSupplyInterposerFruManufacturedForMismatchFault, + PowerSupplyInterposerInserted, + PowerSupplyInterposerInsertFault, + PowerSupplyInterposerInsertFaultCleared, + PowerSupplyInterposerOk, + PowerSupplyInterposerPSCommFault, + PowerSupplyInterposerPSCommFaultCleared, + PowerSupplyInterposerRemoved, + PowerSupplyInterposerWarning, + PowerSupplyIpduInfoChanged, + PowerSupplyOvertempFault, + PowerSupplyPowerCycledFault, + PowerSupplyPsOkFault, + PowerSupplyReinsertFault, + PowerSupplyReplaceFault, + RingNoActiveMgmtPort, + RingNoActiveMgmtPortCleared, + RingNoActiveMgmtPortCleared_OwnerChanged, + RingNoActiveMgmtPort_RingDegraded, + StagedFirmwareOperationSuccessful, + BladeRedundantCommFault, + BladeRedundantCommFaultCleared, + ChassisEventServiceSubscriptionOverrunFault, + ChassisEventServiceSubscriptionOverrunFaultCleared, + ChassisRedundantCommFault, + ChassisRedundantCommFaultCleared, + CIManagerRedundantCommFault, + CiManagerRedundantCommFaultCleared, + EmHighAssuranceBootCritical, + EmRedundantCommFault, + EmRedundantCommFaultCleared, + FanRedundantCommFault, + FanRedundantCommFaultCleared, + FrontPanelRedundantCommFault, + FrontPanelRedundantCommFaultCleared, + InterconnectRedundantCommFault, + InterconnectRedundantCommFaultCleared, + OneViewServiceEventsCommFault, + OneViewServiceEventsCommFaultCleared, + PowerSupplyRedundantCommFault, + SupplyRedundantCommFaultCleared, + coldStart, + linkDown, + linkUp, + TopologyError, + PartnerSwitchCommunicationFailure, + PartnerSwitchVersionMismatch, + PartnerSwitchWWIDMismatch, + PartnerSwitchNotPresent, + NotConfigured, + CommunicationError, + opModeChange, + subPortStatusChange, + linkStateChange, + connectionStateChange, cpqHe3TemperatureDegraded, cpqHe3ThermalConfirmation, cpqSeCpuStatusChange, @@ -232,7 +403,6 @@ enableRichTLV, uplinkSetStateChange, interconnectStateChange, -// connection.bandwidthChange, sanVlanMismatch, cannotCommunicateWithSwitch, disabledInterconnectConnectivityForSwitch, @@ -240,7 +410,6 @@ duplicateSwitch, invalidSwitchCredentials, invalidXmlReturnedFromSwitch, - BladeConfigurationFault, BladeConfigurationFaultCleared, BladeCritical, @@ -482,14 +651,13 @@ TooManySessions, UpdateInterrupted, UpdateSuccessful, - InterconnectManagerICMReadyFaultCleared, - OEM_EVENT) + OEM_EVENT) OV_REST_ENUM(name, TASK_ADD, TASK_REMOVE, - TASK_POWER_ON, - TASK_POWER_OFF, - TASK_ACTIVATE_STANDBY_APPLIANCE, + TASK_POWER_ON, + TASK_POWER_OFF, + TASK_ACTIVATE_STANDBY_APPLIANCE, TASK_REFRESH, TASK_COLLECT_UTILIZATION_DATA, TASK_MANAGE_UTILIZATION_DATA, @@ -497,24 +665,24 @@ TASK_ASSIGN_IPV4_ADDRESS, TASK_INTERCONNECT_IPV4_CONSISTENCY_CHECK, TASK_BACKGROUND_REFRESH, - TASK_CHECK_DEVICE_IDENTITY_AND_LOCATION, - TASK_RESET_SYNERGY_FRAME_LINK_MODULE, - TASK_CLEAR_ALERTS, - TASK_UPDATE, - TASK_CONFIGURE_BOOT_ORDER_SETTINGS_FOR_SERVER, - TASK_ASSIGN_PROFILE, - TASK_BACKGROUNDREPOREFRESHTASK, - TASK_CLEAR_PROFILE, - TASK_CONFIGURE, - TASK_CREATE, - TASK_DELETE, - TASK_LOGICAL_ENCLOSURE_FIRMWARE_UPDATE, - TASK_REAPPLY_CONFIGURATION, - TASK_RELEASE, - TASK_REMOVE_PROFILE, - TASK_UPDATE_ENCLOSURE_FIRMWARE, - TASK_VALIDATE, - TASK_RESET) + TASK_CHECK_DEVICE_IDENTITY_AND_LOCATION, + TASK_RESET_SYNERGY_FRAME_LINK_MODULE, + TASK_CLEAR_ALERTS, + TASK_UPDATE, + TASK_CONFIGURE_BOOT_ORDER_SETTINGS_FOR_SERVER, + TASK_ASSIGN_PROFILE, + TASK_BACKGROUNDREPOREFRESHTASK, + TASK_CLEAR_PROFILE, + TASK_CONFIGURE, + TASK_CREATE, + TASK_DELETE, + TASK_LOGICAL_ENCLOSURE_FIRMWARE_UPDATE, + TASK_REAPPLY_CONFIGURATION, + TASK_RELEASE, + TASK_REMOVE_PROFILE, + TASK_UPDATE_ENCLOSURE_FIRMWARE, + TASK_VALIDATE, + TASK_RESET) OV_REST_ENUM( sensorStatus, SENSOR_STATUS_NO_OP, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-01-26 02:08:51
|
Revision: 7740 http://sourceforge.net/p/openhpi/code/7740 Author: dr_mohan Date: 2018-01-26 02:08:49 +0000 (Fri, 26 Jan 2018) Log Message: ----------- Fix for #1990 ov_rest cert path is not getting created Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_event.c Modified: openhpi/trunk/plugins/ov_rest/ov_rest_event.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_event.c 2018-01-24 18:14:17 UTC (rev 7739) +++ openhpi/trunk/plugins/ov_rest/ov_rest_event.c 2018-01-26 02:08:49 UTC (rev 7740) @@ -1253,9 +1253,9 @@ } } if (stat(CA_PATH, &st) == -1) { - if(mkdir(OV_REST_PATH, 0600)== -1){ + if(mkdir(CA_PATH, 0600)== -1){ CRIT("Failed to create the directory %s, %s", - OV_REST_PATH, strerror(errno)); + CA_PATH, strerror(errno)); } } memset(&response,0, sizeof(struct certificateResponse)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-01-24 18:14:18
|
Revision: 7739 http://sourceforge.net/p/openhpi/code/7739 Author: hemanthreddy Date: 2018-01-24 18:14:17 +0000 (Wed, 24 Jan 2018) Log Message: ----------- Fix for the issue #1984 handle case DISCOVERY_FAILED in ov_rest_discover_resources Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c openhpi/trunk/plugins/ov_rest/ov_rest_re_discover.c Modified: openhpi/trunk/plugins/ov_rest/ov_rest_discover.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-17 19:32:50 UTC (rev 7738) +++ openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-24 18:14:17 UTC (rev 7739) @@ -48,6 +48,7 @@ int ov_rest_Total_Temp_Sensors = 0; static void ov_rest_push_disc_res(struct oh_handler_state *oh_handler); + /** * ov_rest_getapplianceNodeInfo: * @oh_handler: Pointer to openhpi handler. @@ -1612,6 +1613,7 @@ GError **error = NULL; struct oh_handler_state *handler = NULL; struct ov_rest_handler *ov_handler = NULL; + struct idleTimeout sess_timeout = {0}; handler = (struct oh_handler_state *) oh_handler; ov_handler = (struct ov_rest_handler *) handler->data; @@ -1629,17 +1631,7 @@ return SA_OK; } - /* Take the mutex here. Because discover thread and event thread - * may invoke this function */ wrap_g_mutex_lock(ov_handler->mutex); - if(g_thread_self() == ov_handler->thread_handler){ - /* Event thread wants to re discover the resources. - * Set the ov_handler->status to PRE_DISCOVERY - */ - ov_handler->status = PRE_DISCOVERY; - err("Event thread invoked ov_rest_discover_resources()" - " to re discover the resources"); - } switch(ov_handler->status) { case PRE_DISCOVERY: dbg("First discovery"); @@ -1653,16 +1645,33 @@ } break; case DISCOVERY_FAIL: - err("Discovery failed for OV IP %s", + err("Re-discovery, after failure, for OneView %s", ov_handler->connection->hostname); - break; + rv = ov_rest_connection_init(handler); + if(rv != SA_OK){ + err("Please check whether the Synergy " + "Composer %s is accessible", + ov_handler->connection->hostname); + return rv; + } + rv = ov_rest_re_discover_resources(handler); + if (rv != SA_OK) { + err("Re-discovery failed "); + wrap_g_mutex_unlock(ov_handler->mutex); + return rv; + } + ov_handler->status = DISCOVERY_COMPLETED; + wrap_g_mutex_unlock(ov_handler->mutex); + err("Re-discovery successfull"); + return rv; + case DISCOVERY_COMPLETED: dbg("Discovery already done"); /* Call a function to keep the session alive */ - struct idleTimeout sess_timeout = {0}; rv = ov_rest_session_timeout(ov_handler,&sess_timeout); if ( rv != SA_OK) { err("Session is Not Alive. No idleTimeout"); + ov_handler->status = DISCOVERY_FAIL; wrap_g_mutex_unlock(ov_handler->mutex); return rv; } @@ -1692,23 +1701,6 @@ if(rv != SA_OK) { err("Discovery Failed"); ov_handler->status = DISCOVERY_FAIL; - if(g_thread_self() == ov_handler->thread_handler){ - /* Event thread faild to re discover the resources. - * Set the ov_handler->status back to - * DISCOVERY_COMPLETED, to avoid discovery thread, - * entering the discovery code. - * Event thread will enter again with proper connection - * information to re discover again. - */ - ov_handler->status = DISCOVERY_COMPLETED; - err("Event thread invoked ov_rest_discover_resources()" - " and faild to re discover the resources"); - } - - /* Cleanup the RPTable which may have partially discovered - * resource information. - */ - ov_rest_clean_rptable(oh_handler); wrap_g_mutex_unlock(ov_handler->mutex); return rv; } @@ -1921,9 +1913,9 @@ ov_rest_wrap_json_object_put(ha_array_response.root_jobj); if (strcmp(ha_node_result.role, "Active") == 0) { - if(strstr(active_sno, ha_node_result.uri) == NULL) { - CRIT("Active composer sno %s and uri %s differ", - active_sno, ha_node_result.uri); + if(strstr(ha_node_result.uri, active_sno) == NULL) { + CRIT("Active composer uri %s and sno %s differ", + ha_node_result.uri, active_sno); } rv = ov_rest_build_appliance_rpt(handler, &ha_node_result, &resource_id, "Active"); @@ -3685,6 +3677,7 @@ arraylen = json_object_array_length(enc_response.enclosure_array); for (i=0; i< arraylen; i++){ + memset(&enc_result, 0, sizeof(enc_result)); jvalue = json_object_array_get_idx( enc_response.enclosure_array,i); if (!jvalue){ @@ -3703,6 +3696,8 @@ } comp_arraylen = json_object_array_length(jvalue_comp_array); for(j = 0; j < comp_arraylen; j++){ + memset(&composer_info, 0, sizeof(composer_info)); + memset(&ha_node_result, 0, sizeof(ha_node_result)); jvalue_composer = json_object_array_get_idx(jvalue_comp_array, j); if (!jvalue_composer) { @@ -3712,12 +3707,22 @@ } ov_rest_json_parse_applianceInfo(jvalue_composer, &composer_info); - if(!composer_info.serialNumber){ + /* Check if the composer presence, if Absent ignore it + * and go for next composer. + * */ + if(composer_info.presence == Absent){ + continue; + } + /* Check if the composer is present but serial number + * is null then ignore and continue. + * */ + if(composer_info.serialNumber == '\0'){ CRIT("Composer Serial Number is NULL in bay %d" " of Enclosure rerial number %s", j+1, enc_result.serialNumber); continue; } + WRAP_ASPRINTF(&ov_handler->connection->url, OV_APPLIANCE_HA_NODE_ID_URI, ov_handler->connection->hostname, @@ -3741,6 +3746,16 @@ ov_rest_wrap_json_object_put( ha_node_response.root_jobj); + /* Build rpt entry for composer */ + rv = ov_rest_build_composer_rpt(handler, + &ha_node_result, &resource_id, + ha_node_result.role); + if(rv != SA_OK){ + err("Failed to Add Composer rpt for bay %d.", + composer_info.bayNumber); + continue; + } + enclosure = ov_handler->ov_rest_resources.enclosure; while(enclosure != NULL){ if(strstr(enclosure->serialNumber, @@ -3760,15 +3775,6 @@ " serial number %s is unavailable", composer_info.serialNumber); } - /* Build rpt entry for composer */ - rv = ov_rest_build_composer_rpt(handler, - &ha_node_result, &resource_id, - ha_node_result.role); - if(rv != SA_OK){ - err("Failed to Add Composer rpt for bay %d.", - composer_info.bayNumber); - continue; - } /* Build rdr entry for server */ rv = ov_rest_build_composer_rdr(handler, &composer_info, &ha_node_result, resource_id); Modified: openhpi/trunk/plugins/ov_rest/ov_rest_re_discover.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_re_discover.c 2018-01-17 19:32:50 UTC (rev 7738) +++ openhpi/trunk/plugins/ov_rest/ov_rest_re_discover.c 2018-01-24 18:14:17 UTC (rev 7739) @@ -838,6 +838,7 @@ * and if found build the RPT. */ for (i=0; i< arraylen; i++){ + memset(&result, 0, sizeof(result)); jvalue = json_object_array_get_idx(response.enclosure_array,i); if (!jvalue){ CRIT("Invalid response for the enclosure in bay %d", @@ -856,6 +857,11 @@ } comp_arraylen = json_object_array_length(jvalue_comp_array); for(j = 0; j < comp_arraylen; j++){ + /* Set the composer_info and ha_node_result c + * ontents to 0, at the begining of the loop*/ + + memset(&composer_info, 0, sizeof(composer_info)); + memset(&ha_node_result, 0, sizeof(ha_node_result)); jvalue_composer = json_object_array_get_idx(jvalue_comp_array, j); if (!jvalue_composer) { @@ -865,29 +871,34 @@ } ov_rest_json_parse_applianceInfo(jvalue_composer, &composer_info); + if((!composer_info.serialNumber[0] == '\0')){ + WRAP_ASPRINTF(&ov_handler->connection->url, + OV_APPLIANCE_HA_NODE_ID_URI, + ov_handler->connection->hostname, + composer_info.serialNumber); + rv = ov_rest_getapplianceHANodeArray(oh_handler, + &ha_node_response, + ov_handler->connection, NULL); + if(rv != SA_OK || ha_node_response.haNodeArray + == NULL) { + CRIT("No response from " + "ov_rest_getapplianceHANodeArray"); + return rv; + } - WRAP_ASPRINTF(&ov_handler->connection->url, - OV_APPLIANCE_HA_NODE_ID_URI, - ov_handler->connection->hostname, - composer_info.serialNumber); - rv = ov_rest_getapplianceHANodeArray(oh_handler, - &ha_node_response, - ov_handler->connection, NULL); - if(rv != SA_OK || ha_node_response.haNodeArray - == NULL) { - CRIT("No response from " - "ov_rest_getapplianceHANodeArray"); - return rv; - } + ov_rest_json_parse_appliance_Ha_node( + ha_node_response.haNodeArray, + &ha_node_result); - ov_rest_json_parse_appliance_Ha_node( - ha_node_response.haNodeArray, - &ha_node_result); + ov_rest_wrap_json_object_put( + ha_node_response.root_jobj); + } else if(composer_info.presence == Present){ + CRIT("Composer serial number is NULL" + "for the bay %d", composer_info.bayNumber); + continue; + } enclosure = ov_handler->ov_rest_resources.enclosure; - ov_rest_wrap_json_object_put( - ha_node_response.root_jobj); - while(enclosure){ if(strstr(result.serialNumber, enclosure->serialNumber)){ @@ -897,7 +908,7 @@ } if(enclosure){ if((enclosure->composer.presence - [ha_node_result.bayNumber-1] == RES_ABSENT) && + [composer_info.bayNumber-1] == RES_ABSENT) && (composer_info.presence == Present)){ rv = add_composer(oh_handler, &composer_info, @@ -910,12 +921,12 @@ return rv; } }else if((enclosure->composer. - presence[ha_node_result.bayNumber-1] + presence[composer_info.bayNumber-1] == RES_PRESENT) && (composer_info.presence == Absent) ){ rv = remove_composer(oh_handler, enclosure, - ha_node_result.bayNumber); + composer_info.bayNumber); if(rv != SA_OK){ err("Unable to remove composer " "with serial number: " @@ -924,7 +935,7 @@ return rv; } }else if((enclosure->composer. - presence[ha_node_result.bayNumber-1] + presence[composer_info.bayNumber-1] == RES_PRESENT) && (composer_info.presence == Present) ){ if(strstr( @@ -935,7 +946,7 @@ }else{ rv = remove_composer(oh_handler, enclosure, - ha_node_result.bayNumber); + composer_info.bayNumber); if(rv != SA_OK){ err("Unable to remove " "composer with" @@ -956,12 +967,9 @@ } } } - continue; - } - memset(&composer_info, 0, sizeof(composer_info)); - memset(&ha_node_result, 0, sizeof(ha_node_result)); - } - } + }// end of if(enclosure) + } // end of inner for loop + } // end of outer for loop ov_rest_wrap_json_object_put(response.root_jobj); return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-01-17 19:32:52
|
Revision: 7738 http://sourceforge.net/p/openhpi/code/7738 Author: hemanthreddy Date: 2018-01-17 19:32:50 +0000 (Wed, 17 Jan 2018) Log Message: ----------- Fix for the issue #1986 Increase the X-Api-Version to 600 Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-16 22:18:17 UTC (rev 7737) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-17 19:32:50 UTC (rev 7738) @@ -713,8 +713,32 @@ **/ void ov_rest_json_parse_ca( json_object *jobj, struct certificates *response) { - - response->ca = json_object_get_string(jobj); + json_object *member = NULL, *jvalue = NULL, *cert = NULL; + if(jobj == NULL){ + err("Invalid Parameters"); + return; + } + member = ov_rest_wrap_json_object_object_get(jobj, "members"); + if(member){ + jvalue = json_object_array_get_idx(member, 0); + if(jvalue == NULL){ + err("Invalid Response"); + return; + } + cert = ov_rest_wrap_json_object_object_get(jvalue, + "certificateDetails"); + if(!cert){ + err("Invalid Response"); + return; + } + json_object_object_foreach(cert, key, val){ + if(!strcmp(key,"base64Data")) + response->ca = json_object_get_string(val); + } + + }else{ + response->ca = json_object_get_string(jobj); + } } /** Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-16 22:18:17 UTC (rev 7737) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-17 19:32:50 UTC (rev 7738) @@ -935,7 +935,7 @@ #define OV_REST_CONTENT_TYPE \ "Content-Type: application/json" #define OV_REST_X_API_VERSION \ - "X-API-Version: 300" + "X-API-Version: 600" #define OV_REST_AUTH \ "Auth: %s" #define OV_REST_SESSIONID \ @@ -953,7 +953,7 @@ #define OV_GET_CERTIFICATES_URI \ "https://%s/rest/certificates/client/rabbitmq/keypair/default" #define OV_GET_CA_URI \ - "https://%s/rest/certificates/ca" + "https://%s/rest/certificates/ca?filter=certType:INTERNAL" #define OV_APPLIANCE_VERSION_URI \ "https://%s/rest/appliance/nodeinfo/version" #define OV_GET_IDLE_TIMEOUT_URI \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-01-16 22:18:19
|
Revision: 7737 http://sourceforge.net/p/openhpi/code/7737 Author: hemanthreddy Date: 2018-01-16 22:18:17 +0000 (Tue, 16 Jan 2018) Log Message: ----------- Fix for the issue#1987 Alert fields reorder leads to segfault Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-13 04:22:10 UTC (rev 7736) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.c 2018-01-16 22:18:17 UTC (rev 7737) @@ -312,6 +312,12 @@ if(dest[j] == '.') dest[j] = ' '; } + if(!evtinfo->phyResourceType){ + err("physicalResourceType is null for this alert, so setting " + "alertTypeId to OEM_EVENT"); + evtinfo->alertTypeId = rest_enum(eventType_S,"OEM_EVENT"); + return -1; + } if(!strcmp(evtinfo->phyResourceType, "sas-interconnects")){ ret = sscanf(dest, "hpris %*s %s %*d", trimmed_alert); }else{ @@ -326,8 +332,7 @@ trimmed_alert); } if( ret != 1){ - err("ov_rest_json_parse_alerts: incorrect" - " alertTypeID string: %s", dest); + err("Incorrect alertTypeID string: %s", dest); evtinfo->alertTypeId = rest_enum(eventType_S, "OEM_EVENT"); return 1; @@ -361,7 +366,7 @@ } /** - * ov_rest_json_parse_alerts: + * ov_rest_json_parse_alerts_utility: * @jobj : Pointer to json_object. * @evtinfo: Pointer to eventInfo. * @@ -372,10 +377,10 @@ * None. * **/ -void ov_rest_json_parse_alerts( json_object *jobj, struct eventInfo* evtinfo) +void ov_rest_json_parse_alerts_utility( json_object *jobj, + struct eventInfo* evtinfo) { - int ret; - json_object *associatedResource = NULL; +// json_object *associatedResource = NULL; json_object * jvalue = jobj; json_object_object_foreach(jvalue, key, val){ @@ -390,13 +395,18 @@ evtinfo->resourceUri = json_object_get_string(val); continue; } + /* We are not using the commented code below, But it is for + * future purpose*/ + /* if(!strcmp(key,"associatedResource")){ associatedResource = ov_rest_wrap_json_object_object_get(jobj, "associatedResource"); - ov_rest_json_parse_alerts(associatedResource, evtinfo); + ov_rest_json_parse_alerts_utility(associatedResource, + evtinfo); continue; } + */ if(!strcmp(key,"physicalResourceType")){ evtinfo->phyResourceType = json_object_get_string(val); continue; @@ -403,12 +413,6 @@ } if(!strcmp(key,"alertTypeID") || !strcmp(key,"name")){ evtinfo->alert_name = json_object_get_string(val); - ret = ov_rest_trim_alert_string( - json_object_get_string(val), - evtinfo); - if(ret != 1){ - dbg("Unknown alert. Skipping it for now"); - } continue; } if(!strcmp(key,"alertState")){ @@ -439,6 +443,32 @@ } /** + * ov_rest_json_parse_alerts: + * @jobj : Pointer to json_object. + * @evtinfo: Pointer to eventInfo. + * + * Purpose: + * First it invokes the ov_rest_json_parse_alerts_utility function to + * fully parse the received alert, and then ov_rest_trim_alert_string + * function trims the alerttypeID string using parsed alert infomration. + * + * Return: + * None. + * + **/ + +void ov_rest_json_parse_alerts( json_object *jobj, struct eventInfo* evtinfo) +{ + int ret; + ov_rest_json_parse_alerts_utility( jobj, evtinfo); + ret = ov_rest_trim_alert_string( evtinfo->alert_name, + evtinfo); + if(ret != 1){ + dbg("Unknown alert."); + } +} + +/** * ov_rest_json_parse_tasks: * @jobj : Pointer to json_object. * @evtinfo: Pointer to eventInfo. Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-13 04:22:10 UTC (rev 7736) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-16 22:18:17 UTC (rev 7737) @@ -1032,6 +1032,8 @@ void ov_rest_json_parse_datacenter( json_object *jarray, int i, struct datacenterInfo* response); void ov_rest_json_parse_events( json_object *jobj, struct eventInfo* response); +void ov_rest_json_parse_alerts_utility( json_object *jobj, + struct eventInfo* response); void ov_rest_json_parse_alerts( json_object *jobj, struct eventInfo* response); void ov_rest_json_parse_tasks( json_object *jobj, struct eventInfo* response); #endif /*_PARSER_CALLS_H*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-01-13 04:22:12
|
Revision: 7736 http://sourceforge.net/p/openhpi/code/7736 Author: dr_mohan Date: 2018-01-13 04:22:10 +0000 (Sat, 13 Jan 2018) Log Message: ----------- Fix for #1985 Fix compile error in ov_rest_discover.c Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c Modified: openhpi/trunk/plugins/ov_rest/ov_rest_discover.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-13 02:49:43 UTC (rev 7735) +++ openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-13 04:22:10 UTC (rev 7736) @@ -1571,7 +1571,7 @@ } wrap_free(s.ptr); ov_rest_wrap_json_object_put(s.jobj); - wrap_g_free(connection->url); + wrap_g_free(ov_handler->connection->url); curl_easy_cleanup(curl); curl_global_cleanup(); return rv; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-01-13 02:49:45
|
Revision: 7735 http://sourceforge.net/p/openhpi/code/7735 Author: dr_mohan Date: 2018-01-13 02:49:43 +0000 (Sat, 13 Jan 2018) Log Message: ----------- Fix for #1982 Session id expires if no activity in a day Modified Paths: -------------- openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c openhpi/trunk/plugins/ov_rest/ov_rest_discover.c openhpi/trunk/plugins/ov_rest/ov_rest_discover.h openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h Modified: openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-01-12 23:19:18 UTC (rev 7734) +++ openhpi/trunk/plugins/ov_rest/ov_rest_callsupport.c 2018-01-13 02:49:43 UTC (rev 7735) @@ -116,14 +116,18 @@ struct curl_slist *chunk, CURL* curl, OV_STRING *st) { char *Auth=NULL, *X_Auth_Token = NULL; + char *SessionId = NULL; char curlErrStr[CURL_ERROR_SIZE+1]; WRAP_ASPRINTF(&Auth,OV_REST_AUTH,connection->auth); + WRAP_ASPRINTF(&SessionId,OV_REST_SESSIONID,connection->auth); chunk = curl_slist_append(chunk, OV_REST_ACCEPT); chunk = curl_slist_append(chunk, OV_REST_CHARSET); chunk = curl_slist_append(chunk, OV_REST_CONTENT_TYPE); chunk = curl_slist_append(chunk, OV_REST_X_API_VERSION); chunk = curl_slist_append(chunk, Auth); + chunk = curl_slist_append(chunk, SessionId); wrap_free(Auth); + wrap_free(SessionId); if(connection->xAuthToken != NULL){ WRAP_ASPRINTF(&X_Auth_Token,OV_REST_X_AUTH_TOKEN, connection->xAuthToken); @@ -374,34 +378,31 @@ type = json_object_get_type(val); switch (type) { case json_type_null: - dbg("\n %s = (null)\n",key); + dbg("%s = (null)",key); break; case json_type_boolean: - dbg("\n %s = %s\n", + dbg("%s = (boolean) %s", key, json_object_get_boolean(val)? "true": "false"); break; case json_type_double: - dbg("\n %s = %f\n",key, json_object_get_double(val)); + dbg("%s = (double) %f",key, json_object_get_double(val)); break; case json_type_int: - dbg("\n %s = %d\n",key, json_object_get_int(val)); + dbg("%s = (int) %d",key, json_object_get_int(val)); break; case json_type_string: - dbg("\n %s = %s\n",key, json_object_get_string(val)); + dbg("%s = (string) %s",key, json_object_get_string(val)); break; case json_type_object: - dbg("\nHmmm, not expecting an object. Printing and \n"); - dbg("\n %s = %s\n",key, json_object_get_string(val)); - dbg("\n Skipping \n"); + dbg("Hmmm, not expecting an object. Printing and"); + dbg("%s = (object as string) %s",key, json_object_get_string(val)); break; case json_type_array: - dbg("\n Hmmm, not expecting array. Printing and \n"); - dbg("\n %s = %s\n",key, json_object_get_string(val)); - dbg("\n skipping \n"); + dbg("Hmmm, not expecting array. Printing and "); + dbg("%s = (array as string) %s",key, json_object_get_string(val)); break; default: - dbg("\n ERROR, not expecting %d. What is this?\n",type); - dbg("\n skipping \n"); + dbg("ERROR, not expecting %d. What is this?",type); break; } } Modified: openhpi/trunk/plugins/ov_rest/ov_rest_discover.c =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-12 23:19:18 UTC (rev 7734) +++ openhpi/trunk/plugins/ov_rest/ov_rest_discover.c 2018-01-13 02:49:43 UTC (rev 7735) @@ -1528,6 +1528,55 @@ return SA_OK; } +/** + * ov_rest_session_timeout: + * @ov_handler: Pointer to ov_rest plugin handler. + * @to: Pointer to idleTimeout structure. + * + * Purpose: + * Gets the timeout value to keep the session alive + * + * Detailed Description: + * This was created to keep the session alive by getting the + * idleTimeout value of the session. + * + * Return values: + * SA_OK - On Success. + * SA_ERR_HPI_INVALID_SESSION - No AuthToken for SSO + * SA_ERR_HPI_TIMEOUT - CURLE TIMEOUT + * SA_ERR_HPI_INTERNAL_ERROR - On all other CURL errors. + **/ +SaErrorT ov_rest_session_timeout(struct ov_rest_handler *ov_handler, + struct idleTimeout *to) +{ + SaErrorT rv = SA_OK; + OV_STRING s = {0}; + /* struct timeoutResponse response = {0}; */ + /* json_object *timeoutResponse = NULL; */ + struct curl_slist *chunk = NULL; + curl_global_init(CURL_GLOBAL_ALL); + /* Get a curl handle */ + CURL* curl = curl_easy_init(); + WRAP_ASPRINTF(&ov_handler->connection->url, OV_GET_IDLE_TIMEOUT_URI, + ov_handler->connection->hostname); + rv = ov_rest_curl_get_request(ov_handler->connection, chunk, curl, &s); + if(s.jobj == NULL || s.len == 0 || rv != SA_OK) { + err("Get session idleTimeout failed"); + return rv; + } + json_object_object_foreach(s.jobj, key, val) { + ov_rest_prn_json_obj(key, val); + if(!strcmp(key,"idleTimeout")) + to->timeout = json_object_get_int(val); + } + wrap_free(s.ptr); + ov_rest_wrap_json_object_put(s.jobj); + wrap_g_free(connection->url); + curl_easy_cleanup(curl); + curl_global_cleanup(); + return rv; +} + /* * ov_rest_discover_resources * @oh_handler: Pointer to openhpi handler @@ -1609,6 +1658,15 @@ break; case DISCOVERY_COMPLETED: dbg("Discovery already done"); + /* Call a function to keep the session alive */ + struct idleTimeout sess_timeout = {0}; + rv = ov_rest_session_timeout(ov_handler,&sess_timeout); + if ( rv != SA_OK) { + err("Session is Not Alive. No idleTimeout"); + wrap_g_mutex_unlock(ov_handler->mutex); + return rv; + } + dbg("Session Idle Timeout is %d", sess_timeout.timeout); wrap_g_mutex_unlock(ov_handler->mutex); return SA_OK; default: Modified: openhpi/trunk/plugins/ov_rest/ov_rest_discover.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_discover.h 2018-01-12 23:19:18 UTC (rev 7734) +++ openhpi/trunk/plugins/ov_rest/ov_rest_discover.h 2018-01-13 02:49:43 UTC (rev 7735) @@ -236,6 +236,9 @@ REST_CON *connection, char* ca_doc); +SaErrorT ov_rest_session_timeout(struct ov_rest_handler *ov_handler, + struct idleTimeout *to); + SaErrorT ov_rest_build_appliance_rdr(struct oh_handler_state *oh_handler, struct applianceNodeInfo *response, struct applianceHaNodeInfo *ha_response, Modified: openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h =================================================================== --- openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-12 23:19:18 UTC (rev 7734) +++ openhpi/trunk/plugins/ov_rest/ov_rest_parser_calls.h 2018-01-13 02:49:43 UTC (rev 7735) @@ -535,6 +535,10 @@ const char *SSLKey; const char *ca; }; +struct idleTimeout +{ + int timeout; +}; struct applianceNodeInfoResponse { json_object *root_jobj; @@ -934,6 +938,8 @@ "X-API-Version: 300" #define OV_REST_AUTH \ "Auth: %s" +#define OV_REST_SESSIONID \ + "Session-Id: %s" #define OV_REST_X_AUTH_TOKEN \ "X-auth-Token: %s" #define OV_REST_LOGIN_URI \ @@ -950,6 +956,8 @@ "https://%s/rest/certificates/ca" #define OV_APPLIANCE_VERSION_URI \ "https://%s/rest/appliance/nodeinfo/version" +#define OV_GET_IDLE_TIMEOUT_URI \ + "https://%s/rest/sessions/idle-timeout" #define OV_APPLIANCE_STATUS_URI \ "https://%s/rest/appliance/nodeinfo/status" #define OV_DATACENTER_URI \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hem...@us...> - 2018-01-12 23:19:21
|
Revision: 7734 http://sourceforge.net/p/openhpi/code/7734 Author: hemanthreddy Date: 2018-01-12 23:19:18 +0000 (Fri, 12 Jan 2018) Log Message: ----------- Fix for the issue #1977 Coverity Scan detects several issues Modified Paths: -------------- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c openhpi/trunk/plugins/oa_soap/oa_soap_event.c openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c openhpi/trunk/plugins/oa_soap/oa_soap_oa_event.c openhpi/trunk/plugins/oa_soap/oa_soap_re_discover.c openhpi/trunk/plugins/oa_soap/oa_soap_utils.c Modified: openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c =================================================================== --- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_discover.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -1066,9 +1066,6 @@ /* Check if the discovery reported a failed fan */ failed = SAHPI_FALSE; fanstatus = fandata->status; - 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 @@ -1080,7 +1077,12 @@ * <SPEED VALUE = "0" UNIT="Percentage"/> * </FAN> **/ - if(!strcmp(fanstatus, "Not Installed")|| !strcmp(fanstatus, "Unknown")){ + if( (fanstatus != NULL) && !strcmp( fanstatus, "Failed")){ + failed = SAHPI_TRUE; + }else if(fanstatus == NULL){ + failed = SAHPI_TRUE; + } else if(!strcmp(fanstatus, "Not Installed")|| + !strcmp(fanstatus, "Unknown")){ fandata->fanflags = ~IR_DISCOVERED; } @@ -1186,12 +1188,12 @@ strstr( psustatus, "Lost")) { failed = SAHPI_TRUE; } + if(!strcmp(psustatus, "Not Installed") || + !strcmp(psustatus, "Unknown")){ + psudata->psuflags = ~IR_DISCOVERED; + } } - if(!strcmp(psustatus, "Not Installed") || - !strcmp(psustatus, "Unknown")){ - psudata->psuflags = ~IR_DISCOVERED; - } if( psudata->psuflags & IR_DISCOVERED ){ Modified: openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c =================================================================== --- openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/ilo2_ribcl/ilo2_ribcl_xml.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -1319,11 +1319,9 @@ speed = xmlGetProp( n, (const xmlChar *)"VALUE"); unit = xmlGetProp( n, (const xmlChar *)"UNIT"); } - - ret = ir_xml_record_fandata( ir_handler, (char *)lbl, - (char *)zone, (char *)stat, (char *)speed, - (char *)unit); - + ret = ir_xml_record_fandata( ir_handler, + (char *)lbl, (char *)zone, (char *)stat, + (char *)speed,(char *)unit); if( lbl){ xmlFree( lbl); } @@ -2025,6 +2023,7 @@ *a "Power Supplies" label that we don't care *about, the same is filtered-out here */ + if(lbl && stat) if( xmlStrcmp( lbl, (xmlChar *)"Power Supplies") != 0) if((xmlStrcmp(stat, (xmlChar *)"Not Installed") != 0) || ((xmlStrcmp( stat, (xmlChar *)"Unknown") != 0) && @@ -3269,7 +3268,12 @@ if( n != NULL){ last_update = xmlGetProp(n, (const xmlChar *)"LAST_UPDATE"); time = (struct tm){0,0,0,0,0,0,0,0,-1}; - strptime((const char*) last_update,"%m/%d/%Y %H:%M", &time); + if(last_update){ + strptime((const char*) last_update,"%m/%d/%Y %H:%M", &time); + }else { + tmp=tmp->next; + continue; + } tmp_time = mktime( &time) * 1000000000LL; if (tmp_time > ir_handler->iml_log_time) ir_handler->iml_log_time = tmp_time; @@ -3316,8 +3320,22 @@ if( ret != SA_OK){ err("ilo2_ribcl_iml_event():failed"); - if(local_time > ir_handler->iml_log_time) + if(local_time > ir_handler->iml_log_time){ ir_handler->iml_log_time = local_time; + } + if( severity){ + xmlFree(severity); + severity = NULL; + } + if( class){ + xmlFree(class); + class = NULL; + } + if( last_update){ + xmlFree(last_update); + last_update = NULL; + } + return ( -1); } } @@ -3403,7 +3421,6 @@ count = xmlGetProp( n, (const xmlChar *)"COUNT"); description = xmlGetProp( n, (const xmlChar *)"DESCRIPTION"); - if( !xmlStrcmp( class, (const xmlChar *)"Main Memory") || !xmlStrcmp(class, (const xmlChar *)"Cache Memory") || !xmlStrcmp( class, (const xmlChar *)"Non-Volatile Memory")){ @@ -3446,12 +3463,11 @@ last_update, initial_update, count); err("Description:\"%s\"", description); - if(description) + if(description){ dbg("description = %s", description); - else - dbg("description is NULL"); - strncpy(log_desc,(const char *)description, - SAHPI_SENSOR_BUFFER_LENGTH-1); + strncpy(log_desc,(const char *)description, + SAHPI_SENSOR_BUFFER_LENGTH-1); + } ev->resource = *rpt; ev->hid = oh_handler->hid; ev->event.Source = ev->resource.ResourceId; @@ -3474,7 +3490,7 @@ current_reading.Type = SAHPI_SENSOR_READING_TYPE_BUFFER; strncpy((char *) current_reading.Value.SensorBuffer, log_desc, - SAHPI_SENSOR_BUFFER_LENGTH); + SAHPI_SENSOR_BUFFER_LENGTH-1); ev->event.EventDataUnion.SensorEvent.TriggerReading = current_reading; oh_evt_queue_push(oh_handler->eventq, ev); Modified: openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_callsupport.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -533,7 +533,7 @@ /* Create and initialize a new SSL_CTX structure */ if (! (connection->ctx = oh_ssl_ctx_init())) { err("oh_ssl_ctx_init() failed"); - free(connection); + wrap_free(connection); return(NULL); } @@ -547,7 +547,7 @@ if (connection->doc) { xmlFreeDoc(connection->doc); } - free(connection); + wrap_free(connection); return(NULL); } @@ -661,7 +661,7 @@ ret = asprintf(&header, OA_XML_HEADER, connection->server, nbytes); if(ret == -1){ - free(header); + wrap_free(header); err("Failed to allocate memory for buffer to \ hold OA XML header"); return(-1); @@ -677,11 +677,11 @@ connection->timeout)) { (void) oh_ssl_disconnect(connection->bio, OH_SSL_BI); err("oh_ssl_write() failed"); - free(header); + wrap_free(header); return(-1); } - free(header); + wrap_free(header); /* Write request to server */ dbg("OA request(2):\n%s\n", request); if (oh_ssl_write(connection->bio, request, nbytes, @@ -830,7 +830,7 @@ ret = asprintf(&buf, OA_XML_LOGIN, connection->username, connection->password); if(ret == -1){ - free(buf); + wrap_free(buf); err("Failed to allocate memory for buffer to hold \ OA login credentials"); return -1; @@ -840,10 +840,10 @@ /* Perform login request */ if (soap_message(connection, buf, &doc)) { err("failed to communicate with OA during login"); - free(buf); + wrap_free(buf); return(-1); } - free(buf); + wrap_free(buf); /* Parse looking for session ID. Modified: openhpi/trunk/plugins/oa_soap/oa_soap_event.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_event.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_event.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -224,7 +224,7 @@ rv = asprintf(&url, "%s" PORT, oa->server); if(rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for buffer to \ hold OA credentials"); return (gpointer*) SA_ERR_HPI_OUT_OF_MEMORY; @@ -236,7 +236,7 @@ if (oa->event_con2 == NULL) sleep(2); } - free(url); + wrap_free(url); url = NULL; gettimeofday(&time2, NULL); @@ -311,7 +311,7 @@ } rv = asprintf(&url, "%s" PORT, oa->server); if(rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for \ buffer to hold OA credentials"); @@ -342,13 +342,13 @@ oa->event_con2 failed"); } } - free(url); + wrap_free(url); url = NULL; } /* end of else (non-switchover error handling) */ } /* end of else (SOAP call failure handling) */ } /* end of 'while(listen_for_events == SAHPI_TRUE)' loop */ - free(url); + wrap_free(url); return (gpointer *) SA_OK; } Modified: openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_inventory.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -444,6 +444,7 @@ if (rv != SA_OK) { err("Addition of IDR area failed"); if (rv == SA_ERR_HPI_OUT_OF_MEMORY) { + err("Insufficient memory. Unable to add the idr area"); return SA_ERR_HPI_OUT_OF_SPACE; } return rv; @@ -570,6 +571,7 @@ if (rv != SA_OK) { err("Addition of IDR area failed"); if (rv == SA_ERR_HPI_OUT_OF_MEMORY) { + err("Insufficient memory. Unable to add the idr area"); return SA_ERR_HPI_OUT_OF_SPACE; } return rv; @@ -901,6 +903,7 @@ if (rv != SA_OK) { err("IDR field add failed"); if (rv == SA_ERR_HPI_OUT_OF_MEMORY) { + err("Insufficient memory. Unable to add the idr field"); return SA_ERR_HPI_OUT_OF_SPACE; } return rv; @@ -1035,6 +1038,7 @@ if (rv != SA_OK) { err("IDR field add failed"); if (rv == SA_ERR_HPI_OUT_OF_MEMORY) { + err("Insufficient memory. Unable to add the idr field"); return SA_ERR_HPI_OUT_OF_SPACE; } return rv; @@ -1975,7 +1979,7 @@ rv = asprintf(&tmp, "MP Model name = %s", blade_mp_response.modelName); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP Model name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -1990,7 +1994,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2001,7 +2005,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.ipAddress != NULL) { @@ -2012,7 +2016,7 @@ rv = asprintf(&tmp, "MP IP Address = %s", blade_mp_response.ipAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP IP Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2027,7 +2031,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2038,7 +2042,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.macAddress != NULL) { @@ -2049,7 +2053,7 @@ rv = asprintf(&tmp, "MP MAC Address = %s", blade_mp_response.macAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP MAC Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2064,7 +2068,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2075,7 +2079,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.dnsName != NULL) { @@ -2086,7 +2090,7 @@ rv = asprintf(&tmp, "MP DNS name = %s", blade_mp_response.dnsName); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP DNS name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2101,7 +2105,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2112,7 +2116,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } /* Get the Blade NIC information*/ @@ -2130,7 +2134,7 @@ rv = asprintf(&tmp, "NICs Installed = %d", response.numberOfNics); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold NICs Installed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2145,7 +2149,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2156,7 +2160,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; while (response.nics){ @@ -2172,7 +2176,7 @@ rv = asprintf(&tmp, "%s = %s", nic_info.port, nic_info.macAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MAC Address and NIC Port"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2187,7 +2191,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2198,7 +2202,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } response.nics = soap_next_node(response.nics); @@ -2216,7 +2220,7 @@ if(rv == -1){ err("Failed to allocate memory for buffer to \ hold No. of CPUs"); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -2229,7 +2233,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2240,7 +2244,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } @@ -2252,7 +2256,7 @@ rv = asprintf(&tmp, "CPU %d = %s, %d MHz", ++cpu_no,cpu_info.cpuType,cpu_info.cpuSpeed); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold CPU name and speed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2261,7 +2265,7 @@ else { rv = asprintf(&tmp, "CPU %d = Not present",++cpu_no); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold Not present CPU Number"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2281,7 +2285,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2292,7 +2296,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; response.cpus = soap_next_node(response.cpus); } @@ -2307,7 +2311,7 @@ rv = asprintf(&tmp, "Memory(RAM) = %d MB", response.memory); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold Memory(RAM) size"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2322,7 +2326,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2333,7 +2337,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } @@ -2354,7 +2358,7 @@ rv = asprintf(&tmp, "Mezz No. = %s", mezz_info.mezzNumber); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for \ buffer to hold \ Mezz No."); @@ -2371,7 +2375,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2385,7 +2389,7 @@ SAHPI_MAX_TEXT_ \ BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } /*** Add Mezz Slot Innventory fileds ***/ @@ -2618,7 +2622,7 @@ rv = asprintf(&tmp, "MP Model name = %s", blade_mp_response.modelName); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP Model name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2633,7 +2637,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2644,7 +2648,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.ipAddress != NULL) { @@ -2655,7 +2659,7 @@ rv = asprintf(&tmp, "MP IP Address = %s", blade_mp_response.ipAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP IP Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2670,7 +2674,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2681,7 +2685,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.macAddress != NULL) { @@ -2692,7 +2696,7 @@ rv = asprintf(&tmp, "MP MAC Address = %s", blade_mp_response.macAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP MAC Address"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2707,7 +2711,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2718,7 +2722,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if (blade_mp_response.dnsName != NULL) { @@ -2729,7 +2733,7 @@ rv = asprintf(&tmp, "MP DNS name = %s", blade_mp_response.dnsName); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MP DNS name"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2744,7 +2748,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2755,7 +2759,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } /* Adding Custom Field for Number of NICs Installed*/ @@ -2766,7 +2770,7 @@ rv = asprintf(&tmp, "NICs Installed = %d", response->numberOfNics); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold NICs Installed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2781,7 +2785,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2792,7 +2796,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; while (response->nics){ @@ -2808,7 +2812,7 @@ rv = asprintf(&tmp, "%s = %s", nic_info.port, nic_info.macAddress); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold MAC Address and NIC Port"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2823,7 +2827,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2834,7 +2838,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } response->nics = soap_next_node(response->nics); @@ -2852,7 +2856,7 @@ if(rv == -1){ err("Failed to allocate memory for buffer to \ hold No. of CPUs"); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -2865,7 +2869,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2876,7 +2880,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } @@ -2888,7 +2892,7 @@ rv = asprintf(&tmp, "CPU %d = %s, %d MHz", ++cpu_no,cpu_info.cpuType,cpu_info.cpuSpeed); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold CPU name and speed"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2897,7 +2901,7 @@ else { rv = asprintf(&tmp, "CPU %d = Not present",++cpu_no); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold Not present CPU Number"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2917,7 +2921,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2928,7 +2932,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; response->cpus = soap_next_node(response->cpus); } @@ -2943,7 +2947,7 @@ rv = asprintf(&tmp, "Memory(RAM) = %d MB", response->memory); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for buffer to \ hold Memory(RAM) size"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -2958,7 +2962,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -2969,7 +2973,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } @@ -2984,7 +2988,7 @@ rv = asprintf(&tmp, "Mezz No. = %s", mezz_info.mezzNumber); if(rv == -1){ - free(tmp); + wrap_free(tmp); err("Failed to allocate memory for \ buffer to hold \ Mezz No."); @@ -3001,7 +3005,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3015,7 +3019,7 @@ SAHPI_MAX_TEXT_ \ BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } /*** Add Mezz Slot Innventory fileds ***/ @@ -3141,7 +3145,7 @@ if(rv == -1){ err("Failed to allocate memory for \ buffer to hold Mezz Slot No."); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -3154,7 +3158,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3165,7 +3169,7 @@ err("Source Strig length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } @@ -3182,7 +3186,7 @@ if(rv == -1){ err("Failed to allocate memory for buffer to \ hold InterconnectTrayBay No."); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -3195,7 +3199,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3206,7 +3210,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } if(mezzSlots_slot.interconnectTrayPortNumber != NULL){ @@ -3222,7 +3226,7 @@ if(rv == -1){ err("Failed to allocate memory for buffer to \ hold InterconnectTrayPort No."); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -3234,7 +3238,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3245,7 +3249,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } mezzSlot_Info.slot = soap_next_node(mezzSlot_Info.slot); @@ -3394,7 +3398,7 @@ if(rv == -1){ err("Failed to allocate memory for buffer to \ hold MezzDevPort No."); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ @@ -3407,7 +3411,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3418,7 +3422,7 @@ err("Source String length is greater than \ SAHPI_MAX_TEXT_BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; if(mezzDev_Port.wwpn != NULL){ memset(&hpi_field, 0, sizeof(SaHpiIdrFieldT)); @@ -3432,7 +3436,7 @@ err("Failed to allocate memory for \ buffer to hold \ MezzDevPort wwpn"); - free(tmp); + wrap_free(tmp); return SA_ERR_HPI_OUT_OF_MEMORY; } @@ -3446,7 +3450,7 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); return rv; } @@ -3460,7 +3464,7 @@ SAHPI_MAX_TEXT_ \ BUFFER_LENGTH"); } - free(tmp); + wrap_free(tmp); tmp = NULL; } switch(mezzDev_Port.fabric){ @@ -3764,8 +3768,16 @@ 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, - blade_mp_response.fwVersion); + if(strlen(blade_mp_response.fwVersion) < + SAHPI_MAX_TEXT_BUFFER_LENGTH){ + strcpy ((char *)hpi_field.Field.Data, + blade_mp_response.fwVersion); + }else{ + err("The src string %s is bigger than the max " + "buffer length %d", + blade_mp_response.fwVersion, + SAHPI_MAX_TEXT_BUFFER_LENGTH); + } rv = idr_field_add(&(local_inventory->info.area_list ->field_list), @@ -3909,6 +3921,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add product area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -3934,6 +3948,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add board area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } if (add_success_flag != SAHPI_FALSE) { @@ -3967,6 +3983,8 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -3982,6 +4000,8 @@ rv = soap_getInterconnectTrayPortMap(con, &request, &portmap); if (rv != SOAP_OK) { err("Get Interconnect tray port map failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return SA_ERR_HPI_INTERNAL_ERROR; } @@ -3993,7 +4013,9 @@ rv = asprintf(&tmp, "InterconnectTrayBay No. = %d", portmap.interconnectTrayBayNumber); if(rv == -1){ - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold InterconnectTrayBay No."); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -4006,7 +4028,9 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4013,7 +4037,7 @@ /* Increment the field counter */ local_inventory->info.area_list->idr_area_head. NumFields++; - free(tmp); + wrap_free(tmp); tmp = NULL; } if (portmap.status) { @@ -4023,7 +4047,9 @@ hpi_field.Type = SAHPI_IDR_FIELDTYPE_CUSTOM; rv = asprintf(&tmp, "portMapStatus = %d",portmap.status); if(rv == -1){ - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold portMapStatus"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -4036,7 +4062,9 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4043,7 +4071,7 @@ /* Increment the field counter */ local_inventory->info.area_list->idr_area_head. NumFields++; - free(tmp); + wrap_free(tmp); tmp = NULL; } /* Add interconnect tray size type*/ @@ -4073,6 +4101,8 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4200,6 +4230,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add product area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4225,6 +4257,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add board area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } if (add_success_flag != SAHPI_FALSE) { @@ -4250,8 +4284,15 @@ 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); + if(strlen(extra_data_info.value) < + SAHPI_MAX_TEXT_BUFFER_LENGTH){ + strcpy ((char *)hpi_field.Field.Data, + extra_data_info.value); + }else{ + err("The src string %s is bigger than the max " + "buffer length %d",extra_data_info.value, + SAHPI_MAX_TEXT_BUFFER_LENGTH ); + } rv = idr_field_add(&(local_inventory->info.area_list ->field_list), @@ -4258,6 +4299,8 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4278,13 +4321,21 @@ rv = asprintf(&tmp, "InterconnectTrayBay No. = %d", portmap->interconnectTrayBayNumber); if(rv == -1){ - free(tmp); err("Failed to allocate memory for buffer to \ hold InterconnectTrayBay No."); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return SA_ERR_HPI_OUT_OF_MEMORY; } - strcpy ((char *)hpi_field.Field.Data, - tmp); + if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ + strcpy ((char *)hpi_field.Field.Data, + tmp); + }else{ + err("The src string %s is bigger than the max " + "buffer length %d", tmp, + SAHPI_MAX_TEXT_BUFFER_LENGTH ); + } rv = idr_field_add(&(local_inventory->info.area_list ->field_list), @@ -4291,7 +4342,9 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4298,7 +4351,7 @@ /* Increment the field counter */ local_inventory->info.area_list->idr_area_head. NumFields++; - free(tmp); + wrap_free(tmp); tmp = NULL; } if (portmap->status) { @@ -4308,20 +4361,31 @@ hpi_field.Type = SAHPI_IDR_FIELDTYPE_CUSTOM; rv = asprintf(&tmp, "portMapStatus = %d",portmap->status); if(rv == -1){ - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); err("Failed to allocate memory for buffer to \ hold portMapStatus"); return SA_ERR_HPI_OUT_OF_MEMORY; } - strcpy ((char *)hpi_field.Field.Data, - tmp); + if(strlen(tmp) < SAHPI_MAX_TEXT_BUFFER_LENGTH){ + strcpy ((char *)hpi_field.Field.Data, + tmp); + }else{ + err("The src string %s is bigger than the max " + "buffer length %d", tmp, + SAHPI_MAX_TEXT_BUFFER_LENGTH ); + } + rv = idr_field_add(&(local_inventory->info.area_list ->field_list), &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); - free(tmp); + wrap_free(tmp); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4328,7 +4392,7 @@ /* Increment the field counter */ local_inventory->info.area_list->idr_area_head. NumFields++; - free(tmp); + wrap_free(tmp); tmp = NULL; } /* Add interconnect tray size type*/ @@ -4358,6 +4422,8 @@ &hpi_field); if (rv != SA_OK) { err("Add idr field failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4459,6 +4525,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add product area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4483,6 +4551,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add board area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } if (add_success_flag != SAHPI_FALSE) { @@ -4607,6 +4677,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add product area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } @@ -4631,6 +4703,8 @@ &add_success_flag); if (rv != SA_OK) { err("Add board area failed"); + wrap_g_free(local_inventory->comment); + wrap_g_free(local_inventory); return rv; } if (add_success_flag != SAHPI_FALSE) { Modified: openhpi/trunk/plugins/oa_soap/oa_soap_oa_event.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_oa_event.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_oa_event.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -570,7 +570,8 @@ struct oa_info *temp = NULL; xmlNode *extra_data = NULL; - if (oh_handler == NULL || nw_info == NULL) { + if (oh_handler == NULL || nw_info == NULL || + nw_info->ipAddress == NULL) { err("Invalid parameters"); return; } @@ -585,6 +586,9 @@ case 2: temp = oa_handler->oa_2; break; + default: + err("Invalid Bay number"); + return; } resource_id = oa_handler->oa_soap_resources.oa.resource_id[bay_number - 1]; @@ -608,8 +612,14 @@ /* Copy the server IP address to oa_info structure */ wrap_g_mutex_lock(temp->mutex); memset(temp->server, 0, MAX_URL_LEN); - strncpy(temp->server, nw_info->ipAddress, - strlen(nw_info->ipAddress)); + + if(strlen(nw_info->ipAddress) < MAX_URL_LEN){ + strncpy(temp->server, nw_info->ipAddress, + strlen(nw_info->ipAddress)); + }else{ + CRIT("IP Address %s is bigger than MAX_URL_LEN", + nw_info->ipAddress); + } wrap_g_mutex_unlock(temp->mutex); /* Process the OA link status sensor */ Modified: openhpi/trunk/plugins/oa_soap/oa_soap_re_discover.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_re_discover.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_re_discover.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -1902,7 +1902,6 @@ case (POWER_REBOOT): err("Wrong (REBOOT) Power State detected"); return SA_ERR_HPI_INTERNAL_ERROR; - break; case (POWER_UNKNOWN): state = SAHPI_POWER_OFF; break; @@ -2331,8 +2330,7 @@ }else state = RES_ABSENT; } else { - if ((info_result->serialNumber == NULL || - info_result->serialNumber[0] == '\0')) { + if ((info_result->serialNumber[0] == '\0')) { strcpy(info_result->serialNumber,"No_Report"); err("PSU in slot %d has problem, pls check",i); } Modified: openhpi/trunk/plugins/oa_soap/oa_soap_utils.c =================================================================== --- openhpi/trunk/plugins/oa_soap/oa_soap_utils.c 2018-01-12 19:30:53 UTC (rev 7733) +++ openhpi/trunk/plugins/oa_soap/oa_soap_utils.c 2018-01-12 23:19:18 UTC (rev 7734) @@ -248,7 +248,7 @@ /* Create the OA URL */ rv = asprintf(&url, "%s" PORT, server); if(rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for buffer to \ hold OA credentials"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -263,7 +263,7 @@ /* Estabish the connection with OA */ hpi_con = soap_open(url, user_name, password, HPI_CALL_TIMEOUT); if (hpi_con == NULL) { - free(url); + wrap_free(url); err("hpi_con intialization for OA - %s has failed", server); return SA_ERR_HPI_INTERNAL_ERROR; } @@ -270,13 +270,13 @@ event_con = soap_open(url, user_name, password, EVENT_CALL_TIMEOUT); if (event_con == NULL) { - free(url); + wrap_free(url); err("event_con intialization for OA - %s has failed", server); soap_close(hpi_con); return SA_ERR_HPI_INTERNAL_ERROR; } - free(url); + wrap_free(url); url = NULL; /* Check whether user_name has admin rights */ rv = check_oa_user_permissions(oa_handler, hpi_con, user_name); @@ -474,7 +474,7 @@ strncpy(other_oa->server, active_ip, strlen(active_ip)); rv = asprintf(&url, "%s" PORT, active_ip); if (rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for buffer to \ hold OA credentials"); return SA_ERR_HPI_OUT_OF_MEMORY; @@ -486,7 +486,7 @@ strncpy(other_oa->server, standby_ip, strlen(standby_ip)); rv = asprintf(&url, "%s" PORT, standby_ip); if(rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for buffer to \ hold OA credentials"); @@ -500,7 +500,7 @@ password, HPI_CALL_TIMEOUT); if (other_oa->hpi_con == NULL) { err("Initializing the hpi_con for OA %s failed", url); - free(url); + wrap_free(url); /* If this OA status is ACTIVE, then return error, else ignore * If standby OA is not accessible, then the recovery from * this problem will be done by the event thread. @@ -523,7 +523,7 @@ password, EVENT_CALL_TIMEOUT); if (other_oa->event_con == NULL) { err("Initializing the event_con for OA %s failed", url); - free(url); + wrap_free(url); /* If this OA status is ACTIVE, then return error, else * ignore */ @@ -543,7 +543,7 @@ return SA_OK; } } - free(url); + wrap_free(url); return SA_OK; } @@ -1192,7 +1192,7 @@ wrap_g_mutex_lock(oa->mutex); rv = asprintf(&url, "%s" PORT, oa->server); if(rv == -1){ - free(url); + wrap_free(url); err("Failed to allocate memory for buffer to \ hold OA credentials"); wrap_g_mutex_unlock(oa->mutex); @@ -1203,7 +1203,7 @@ oa->hpi_con = soap_open(url, user_name, password, HPI_CALL_TIMEOUT); if (oa->hpi_con == NULL) { - free(url); + wrap_free(url); /* OA may not be reachable */ wrap_g_mutex_unlock(oa->mutex); return SA_ERR_HPI_INTERNAL_ERROR; @@ -1215,7 +1215,7 @@ oa->event_con = soap_open(url, user_name, password, EVENT_CALL_TIMEOUT); if (oa->event_con == NULL) { - free(url); + wrap_free(url); /* OA may not be reachable */ wrap_g_mutex_unlock(oa->mutex); soap_close(oa->hpi_con); @@ -1223,7 +1223,7 @@ return SA_ERR_HPI_INTERNAL_ERROR; } wrap_g_mutex_unlock(oa->mutex); - free(url); + wrap_free(url); return SA_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dr_...@us...> - 2018-01-12 19:30:56
|
Revision: 7733 http://sourceforge.net/p/openhpi/code/7733 Author: dr_mohan Date: 2018-01-12 19:30:53 +0000 (Fri, 12 Jan 2018) Log Message: ----------- Fix for #1980 Continue with message, if uid_map file creation fails Modified Paths: -------------- openhpi/trunk/utils/uid_utils.c Modified: openhpi/trunk/utils/uid_utils.c =================================================================== --- openhpi/trunk/utils/uid_utils.c 2018-01-11 00:54:09 UTC (rev 7732) +++ openhpi/trunk/utils/uid_utils.c 2018-01-12 19:30:53 UTC (rev 7733) @@ -169,13 +169,6 @@ if (cc != 0) { g_free(oh_uid_map_file); oh_uid_map_file = 0; - - if (cc == -2) { - WARN("UID map file directory does not exist."); - uid_unlock(&oh_uid_lock); - return -1; - } - WARN( "Disabling using UID Map file." ); WARN( "Resource Id will not be persistent." ); } @@ -459,14 +452,12 @@ * This function, if a uid map file exists, reads the current value for * uid and intializes the memory resident uid map file from file. * - * Return value: success 0, error -1, uid map file directory - * does not exist -2. + * Return value: success 0, error -1. */ static gint uid_map_from_file() { FILE *fp; int rval; - struct stat buf; #ifndef _WIN32 mode_t prev_umask; #endif @@ -476,14 +467,6 @@ } fp = fopen(oh_uid_map_file, "rb"); if(!fp) { - /* Check for the existence of uid map file directory. */ - if(stat(VARPATH, &buf) < 0) { - CRIT("uid map file directory '%s' does not exist. Either " - "re-install the package or create the directory " - "maunally.", VARPATH); - return -2; - } - /* create map file with resource id initial value */ WARN("uid_map file '%s' could not be opened, initializing", oh_uid_map_file); #ifndef _WIN32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |