From: Tyrel D. <ty...@us...> - 2010-12-21 02:44:37
|
Update of /cvsroot/sblim/cmpi-base In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv4282 Modified Files: NEWS OSBase_Common.c Log Message: Fixed 2836926: _osbase_common_init unreliable Index: OSBase_Common.c =================================================================== RCS file: /cvsroot/sblim/cmpi-base/OSBase_Common.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- OSBase_Common.c 25 Jul 2009 00:37:30 -0000 1.22 +++ OSBase_Common.c 21 Dec 2010 02:44:26 -0000 1.23 @@ -42,6 +42,7 @@ /* ---------------------------------------------------------------------------*/ +#define DEFAULT_HOST_NAME "localhost.localdomain" char * CIM_HOST_NAME = NULL; char * CIM_OS_NAME = NULL; int CIM_OS_TIMEZONE = 999; @@ -155,7 +156,9 @@ _OSBASE_TRACE(4,("--- _init_system_name() called : init")); host = calloc(1,255); - if ( gethostname(host, 255 ) == -1 ) { return; } + if ( gethostname(host, 255 ) == -1 ) { + _OSBASE_TRACE(4,("--- _init_system_name() : gethostname returned -1")); + } /* if host does not contain a '.' we can suppose, that the domain is not * available in the current value. but we try to get the full qualified * hostname. @@ -185,6 +188,9 @@ strcat( CIM_HOST_NAME, "."); strcat( CIM_HOST_NAME, domain ); } + } else { + CIM_HOST_NAME = calloc(1, (strlen(DEFAULT_HOST_NAME) + 1)); + strcpy(CIM_HOST_NAME, DEFAULT_HOST_NAME); } if(host) free(host); Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-base/NEWS,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- NEWS 15 Dec 2009 20:30:06 -0000 1.39 +++ NEWS 21 Dec 2010 02:44:26 -0000 1.40 @@ -1,6 +1,7 @@ Bugs Fixed: - 2843613 Missing fclose in sblim-cmpi-base - 2882514 leak in sblim-cmpi-base-1.5.9/cmpiOSBase_OperatingSystem.c +- 2836926 _osbase_common_init unreliable Changes in Version 1.6.0 ======================== |