You can subscribe to this list here.
2005 |
Jan
|
Feb
(1) |
Mar
(45) |
Apr
(150) |
May
(145) |
Jun
(150) |
Jul
(79) |
Aug
(313) |
Sep
(160) |
Oct
(309) |
Nov
(115) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(160) |
Feb
(144) |
Mar
(127) |
Apr
(48) |
May
(102) |
Jun
(54) |
Jul
(245) |
Aug
(94) |
Sep
(152) |
Oct
(162) |
Nov
(166) |
Dec
(740) |
2007 |
Jan
(752) |
Feb
(437) |
Mar
(328) |
Apr
(373) |
May
(569) |
Jun
(399) |
Jul
(369) |
Aug
(627) |
Sep
(100) |
Oct
(306) |
Nov
(166) |
Dec
(282) |
2008 |
Jan
(68) |
Feb
(145) |
Mar
(180) |
Apr
(160) |
May
(277) |
Jun
(229) |
Jul
(1188) |
Aug
(51) |
Sep
(97) |
Oct
(99) |
Nov
(95) |
Dec
(170) |
2009 |
Jan
(39) |
Feb
(73) |
Mar
(120) |
Apr
(121) |
May
(104) |
Jun
(262) |
Jul
(57) |
Aug
(171) |
Sep
(131) |
Oct
(88) |
Nov
(64) |
Dec
(83) |
2010 |
Jan
(55) |
Feb
(67) |
Mar
(124) |
Apr
(64) |
May
(130) |
Jun
(75) |
Jul
(164) |
Aug
(64) |
Sep
(44) |
Oct
(17) |
Nov
(43) |
Dec
(31) |
2011 |
Jan
(21) |
Feb
(10) |
Mar
(43) |
Apr
(46) |
May
(52) |
Jun
(71) |
Jul
(7) |
Aug
(16) |
Sep
(51) |
Oct
(14) |
Nov
(33) |
Dec
(15) |
2012 |
Jan
(12) |
Feb
(61) |
Mar
(129) |
Apr
(76) |
May
(70) |
Jun
(52) |
Jul
(29) |
Aug
(41) |
Sep
(32) |
Oct
(23) |
Nov
(38) |
Dec
(26) |
2013 |
Jan
(35) |
Feb
(37) |
Mar
(51) |
Apr
(15) |
May
(52) |
Jun
(15) |
Jul
(23) |
Aug
(21) |
Sep
(46) |
Oct
(69) |
Nov
(57) |
Dec
(26) |
2014 |
Jan
(5) |
Feb
(13) |
Mar
(17) |
Apr
(1) |
May
(5) |
Jun
|
Jul
(2) |
Aug
(2) |
Sep
(1) |
Oct
(16) |
Nov
(8) |
Dec
(4) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(4) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Tyrel D. <ty...@us...> - 2011-05-12 00:46:32
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv5381 Modified Files: NEWS Log Message: Fixed 3005596: virt plugin only connects to libvirtd at load Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- NEWS 11 May 2011 01:42:58 -0000 1.99 +++ NEWS 12 May 2011 00:46:29 -0000 1.100 @@ -2,6 +2,7 @@ - 3275169 bash error reported in provider bootstrap scripts - 3289931 long vm names cause buffer overflow - 3181085 Mandatory Properties not instantiated: CIM_MetricServiceCapa +- 3005596 virt plugin only connects to libvirtd at load Features added: - 3300216 new KVM scheduler counter metrics |
From: Chris B. <buc...@us...> - 2011-05-11 21:02:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via a4c90e9a342adf10b99f00c3dbca3aa8d955f0ab (commit) from 5d4c197e31501fe0c575d0d6c1f5cdde33c21ddb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a4c90e9a342adf10b99f00c3dbca3aa8d955f0ab Author: buccella <buc...@li...> Date: Wed May 11 17:02:43 2011 -0400 added suppression for uninitialized bytes, false pthread leak ----------------------------------------------------------------------- Summary of changes: diff --git a/sfcbd.valgrind-suppress b/sfcbd.valgrind-suppress index 2410f46..ee5178e 100644 --- a/sfcbd.valgrind-suppress +++ b/sfcbd.valgrind-suppress @@ -16,4 +16,38 @@ Memcheck:Param socketcall.recvmsg(msg) fun:recvmsg -} \ No newline at end of file +} +{ + <false leak from detached pthreads> + Memcheck:Leak + fun:calloc + fun:_dl_allocate_tls + fun:pthread_create@@GLIBC_2.1 +} +{ + <uninitialized bytes> + Memcheck:Param + socketcall.sendmsg(msg.msg_iov[i]) + fun:sendmsg +} +{ + <conditional jump depends on uninitialized values> + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start +} +{ + <conditional jump depends on uninitialized values> + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_open_worker + fun:_dl_catch_error + fun:_dl_open + fun:dlopen_doit + fun:_dl_catch_error + fun:_dlerror_run + fun:dlopen@@GLIBC_2.1 + fun:doLoadProvider +} hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2011-05-11 19:42:47
|
Update of /cvsroot/sblim/cmpi-nfsv3 In directory vz-cvs-3.sog:/tmp/cvs-serv3241 Modified Files: configure.ac Log Message: [3299507] obtain full hostname using etab entry Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 2 Jun 2009 23:44:38 -0000 1.3 +++ configure.ac 11 May 2011 19:42:45 -0000 1.4 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(SBLIM BaseOS NFS V3 Providers, 1.1.0, sbl...@li...,sblim-cmpi-nfsv3) +AC_INIT(SBLIM BaseOS NFS V3 Providers, 1.1.1, sbl...@li...,sblim-cmpi-nfsv3) AC_CONFIG_SRCDIR([GLOBALS.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:54:32
|
Update of /cvsroot/sblim/cmpi-nfsv3 In directory vz-cvs-3.sog:/tmp/cvs-serv22035 Modified Files: NEWS Log Message: [3299507] obtain full hostname using etab entry Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/NEWS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NEWS 5 Apr 2011 01:35:17 -0000 1.8 +++ NEWS 11 May 2011 17:54:30 -0000 1.9 @@ -1,3 +1,8 @@ +Changes in 1.1.1 +================ +Features: +- 3299507 obtain fully qualified hostname using etab entry + Bugs: - 3275169 bash error reported in provider bootstrap scripts |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:54:05
|
Update of /cvsroot/sblim/cmpi-nfsv3 In directory vz-cvs-3.sog:/tmp/cvs-serv21991 Modified Files: ChangeLog Log Message: [3299507] obtain full hostname using etab entry Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChangeLog 2 Jun 2009 23:44:38 -0000 1.6 +++ ChangeLog 11 May 2011 17:54:03 -0000 1.7 @@ -1,3 +1,12 @@ +2011-05-11 Narasimmha Sharoff <nsh...@us...> + + * mof/Linux_NFSv3SystemSetting.mof, GLOBALS.h + util/Linux_NFSv3SystemConfigurationUtil.c, + util/parser/lexer.l util/parser/parser.y + util/xmlparser/xmllexer.l + + 3299507 obtain fully qualified hostname using etab entry + 2009-05-22 Tyrel Datwyler <ty...@us...> * Linux_NFSv3SystemConfiguration.c, Linux_NFSv3SystemSetting.c, |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:51:21
|
Update of /cvsroot/sblim/cmpi-nfsv3/mof In directory vz-cvs-3.sog:/tmp/cvs-serv21743/mof Modified Files: Linux_NFSv3SystemSetting.mof Log Message: [3299507] obtain full hostname using etab entry Index: Linux_NFSv3SystemSetting.mof =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/mof/Linux_NFSv3SystemSetting.mof,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Linux_NFSv3SystemSetting.mof 23 May 2009 03:11:03 -0000 1.4 +++ Linux_NFSv3SystemSetting.mof 11 May 2011 17:51:19 -0000 1.5 @@ -128,5 +128,17 @@ [Description ("User ID for anonymous access.") ] uint16 AnonUID; + + [Description + ("Crossmnt enabled if true") ] + boolean Crossmnt; + + [Description + ("Valid values are: all_squash, no_all_squash") ] + string AllSquash; + + [Description + ("Acl enabled if true") ] + boolean Acl; }; |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:50:18
|
Update of /cvsroot/sblim/cmpi-nfsv3/util In directory vz-cvs-3.sog:/tmp/cvs-serv20461/util Modified Files: Linux_NFSv3SystemConfigurationUtil.c Log Message: [3299507] obtain full hostname using etab entry Index: Linux_NFSv3SystemConfigurationUtil.c =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/util/Linux_NFSv3SystemConfigurationUtil.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Linux_NFSv3SystemConfigurationUtil.c 23 May 2009 03:11:03 -0000 1.7 +++ Linux_NFSv3SystemConfigurationUtil.c 11 May 2011 17:50:16 -0000 1.8 @@ -27,6 +27,7 @@ #include <string.h> #include <errno.h> #include <unistd.h> +#include <sys/types.h> #include <sys/stat.h> /* Required CMPI library headers */ @@ -54,6 +55,9 @@ FILE * handle; } _FILEINFO; +/* Information on config file used; used for Filename property */ +static int cfg_used = USE_ETAB_CFG; + /* --------------------------------------------------------------------------- * IMPORTED EXTERNALLY DEFINED FUNCTIONS @@ -419,6 +423,18 @@ return 1; } +/* Check if the file exists and length > 0 */ +static int +valid_file(char *filename) +{ + struct stat sbuf; + + if (stat(filename, &sbuf) != 0) return -1; + if (sbuf.st_size <= 0) return -1; + + return 0; +} + /* ----------------------------------------------------------------------------------- */ /* @@ -429,12 +445,18 @@ FILE * sourcefile; /* Handle for the original config file */ _FILEINFO * xmlfileinfo; /* Filename and handle for the translated XML config file */ - /* Read from the original config file */ - if ((sourcefile = fopen(_CONFIGFILE,"r")) == NULL) { - _OSBASE_TRACE(1,("startReadingInstances() : Cannot read from config file %s", _CONFIGFILE)); - return NULL; + /* If etab file doesn't exist or is zero bytes, use exports */ + if ( ((sourcefile = fopen(_CONFIGFILE_ETAB, "r")) == NULL) || + (valid_file(_CONFIGFILE_ETAB) == -1) ) { + _OSBASE_TRACE(4,("startReadingInstances() : %s not found or contains no entries. Using /etc/exports", _CONFIGFILE_ETAB)); + if ((sourcefile = fopen(_CONFIGFILE,"r")) == NULL) { + _OSBASE_TRACE(1,("startReadingInstances() : Cannot read from config file %s", _CONFIGFILE)); + return NULL; + } + else cfg_used = USE_EXPORTS_CFG; } + /* Write a new temp file containing the translated XML config file */ xmlfileinfo = malloc(sizeof(_FILEINFO)); tmpnam(xmlfileinfo->name); @@ -505,7 +527,10 @@ CMSetProperty(*instance, "SystemCreationClassName", CSCreationClassName, CMPI_chars); CMSetProperty(*instance, "CreationClassName", _SETTINGCLASSNAME, CMPI_chars); /* Note - the SettingID key property is set by each config file instance */ + if (cfg_used == USE_EXPORTS_CFG) CMSetProperty(*instance, "Filename", _CONFIGFILE, CMPI_chars); + else + CMSetProperty(*instance, "Filename", _CONFIGFILE_ETAB, CMPI_chars); /* stat() the config file to set the Readable and Writeable properties */ if (stat(_CONFIGFILE, &fileinfo) == 0) { @@ -646,7 +671,11 @@ CMSetProperty(instance, "Name", _CONFIGNAME, CMPI_chars); /* stat() the config file to set the Readable and Writeable properties */ + if (cfg_used == USE_EXPORTS_CFG) CMSetProperty(instance, "Filename", _CONFIGFILE, CMPI_chars); + else + CMSetProperty(instance, "Filename", _CONFIGFILE_ETAB, CMPI_chars); + if (stat(_CONFIGFILE, &fileinfo) == 0) { value.boolean = ((fileinfo.st_mode & S_IRUSR) != 0); CMSetProperty(instance, "Readable", &value, CMPI_boolean); |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:47:44
|
Update of /cvsroot/sblim/cmpi-nfsv3 In directory vz-cvs-3.sog:/tmp/cvs-serv20249 Modified Files: GLOBALS.h Log Message: [3299507] obtain full hostname using etab entry Index: GLOBALS.h =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/GLOBALS.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- GLOBALS.h 25 Feb 2004 07:26:06 -0000 1.1.1.1 +++ GLOBALS.h 11 May 2011 17:47:42 -0000 1.2 @@ -3,6 +3,9 @@ static char * _SETTINGCLASSNAME = "Linux_NFSv3SystemSetting"; static char * _ASSOCCLASSNAME = "Linux_NFSv3SettingContext"; static char * _CONFIGFILE = "/etc/exports"; +static char * _CONFIGFILE_ETAB = "/var/lib/nfs/etab"; #define _MAXNAMELENGTH 1024 #define _READONLY 0 +#define USE_EXPORTS_CFG 1 +#define USE_ETAB_CFG 2 |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:47:06
|
Update of /cvsroot/sblim/cmpi-nfsv3/util/xmlparser In directory vz-cvs-3.sog:/tmp/cvs-serv20154/util/xmlparser Modified Files: xmllexer.l Log Message: [3299507] obtain full hostname using etab entry Index: xmllexer.l =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/util/xmlparser/xmllexer.l,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xmllexer.l 5 Feb 2007 09:44:16 -0000 1.2 +++ xmllexer.l 11 May 2011 17:47:03 -0000 1.3 @@ -6,9 +6,9 @@ %{ #include <string.h> #include "xmlparser.h" -#ifndef YY_FLEX_LEX_COMPAT +/* #ifndef YY_FLEX_LEX_COMPAT int yylineno = 1; -#endif +#endif */ %} /* Some useful regular expressions to use in the RULES section */ |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:45:51
|
Update of /cvsroot/sblim/cmpi-nfsv3/util/parser In directory vz-cvs-3.sog:/tmp/cvs-serv19926/util/parser Modified Files: parser.y Log Message: [3299507] obtain full hostname using etab entry Index: parser.y =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/util/parser/parser.y,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- parser.y 23 Jul 2007 21:46:12 -0000 1.5 +++ parser.y 11 May 2011 17:45:49 -0000 1.6 @@ -62,6 +62,9 @@ %token <boolean> SUBTREECHECK %token <boolean> SECURELOCKS %token <uint16> NUMBER +%token <boolean> CROSSMNT +%token <string> ALLSQUASH +%token <boolean> ACL /* DEFINE PARSER RULE TYPES HERE */ @@ -149,6 +152,9 @@ | SECURELOCKS { startproperty("SecureLocks",CMPI_boolean); setvalue(&$1); endproperty(); } | ANONGID '=' NUMBER { startproperty("AnonGID",CMPI_uint16); setvalue(&$3); endproperty(); } | ANONUID '=' NUMBER { startproperty("AnonUID",CMPI_uint16); setvalue(&$3); endproperty(); } + | CROSSMNT { startproperty("Crossmnt",CMPI_boolean); setvalue(&$1); endproperty(); } + | ALLSQUASH { startproperty("AllSquash",CMPI_string); setvalue($1); endproperty(); free($1); } + | ACL { startproperty("Acl",CMPI_boolean); setvalue(&$1); endproperty(); } ; /* END OF RULES SECTION */ |
From: Narasimha S. <nsh...@us...> - 2011-05-11 17:45:15
|
Update of /cvsroot/sblim/cmpi-nfsv3/util/parser In directory vz-cvs-3.sog:/tmp/cvs-serv19774/util/parser Modified Files: lexer.l Log Message: [3299507] obtain full hostname using etab entry Index: lexer.l =================================================================== RCS file: /cvsroot/sblim/cmpi-nfsv3/util/parser/lexer.l,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lexer.l 5 Feb 2007 09:44:16 -0000 1.2 +++ lexer.l 11 May 2011 17:45:13 -0000 1.3 @@ -7,9 +7,9 @@ #include <string.h> #include "cmpidt.h" #include "parser.h" -#ifndef YY_FLEX_LEX_COMPAT +/* #ifndef YY_FLEX_LEX_COMPAT int yylineno = 1; -#endif +#endif */ char * NFSv3comments = NULL; /* String buffer to accumulate comments */ %} @@ -53,7 +53,6 @@ /* The following lexical tokens return the token identifier and the value of the token (in yylval) */ -all_squash | no_root_squash | root_squash { yylval.string = (char *)strdup(yytext); @@ -90,6 +89,24 @@ return(HIDE); } +crossmnt | +nocrossmnt { + yylval.boolean = !strcmp(yytext,"crossmnt"); + return(CROSSMNT); + } + +all_squash | +no_all_squash { + yylval.string = (char *)strdup(yytext); + return(ALLSQUASH); + } + +acl | +no_acl { + yylval.boolean = !strcmp(yytext,"acl"); + return(ACL); + } + subtree_check | no_subtree_check { yylval.boolean = !strcmp(yytext,"subtree_check"); |
From: Chris B. <buc...@us...> - 2011-05-11 16:16:44
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 5d4c197e31501fe0c575d0d6c1f5cdde33c21ddb (commit) from f7f0f0bcc25c4bbe698b254d67c110e4b8d180a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5d4c197e31501fe0c575d0d6c1f5cdde33c21ddb Author: buccella <buc...@li...> Date: Wed May 11 12:15:20 2011 -0400 [ 3300167 ] Memory leaks caused by cimRequest changes ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 7e93e6b..6012ab0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-11 Chris Buccella <buc...@li...> + + * cimRequest.c: + [ 3300167 ] Memory leaks caused by cimRequest changes + 2011-05-10 Michael Chase-Salerno <br...@li...> * interopServerProvider.c diff --git a/NEWS b/NEWS index db1cbb1..da506dc 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ Bugs fixed: Everything in 1.3.12, plus: +- 3300167 Memory leaks caused by cimRequest changes + Changes in 1.4.1 ================ diff --git a/cimRequest.c b/cimRequest.c index 38c0509..f65f2a8 100644 --- a/cimRequest.c +++ b/cimRequest.c @@ -819,9 +819,11 @@ enumClasses(CimRequestContext * ctx, RequestHdr * hdr) [0].data)); } freeResponseHeaders(resp, hdr->binCtx); + free(hdr->binCtx->bHdr); _SFCB_RETURN(rs); } freeResponseHeaders(resp, hdr->binCtx); + free(hdr->binCtx->bHdr); rs.chunkedMode = 1; rs.rc = err; @@ -1124,9 +1126,11 @@ execQuery(CimRequestContext * ctx, RequestHdr * hdr) 1]->object [0].data)); } + free(hdr->binCtx->bHdr); freeResponseHeaders(resp, hdr->binCtx); _SFCB_RETURN(rs); } + free(hdr->binCtx->bHdr); freeResponseHeaders(resp, hdr->binCtx); rs.chunkedMode = 1; rs.rc = err; @@ -1642,6 +1646,9 @@ setQualifier(CimRequestContext * ctx, RequestHdr * hdr) if (resp) { free(resp); } + SetQualifierReq* sreq = (SetQualifierReq*)hdr->binCtx->bHdr; + free(sreq->qualifier.data); + free(hdr->binCtx->bHdr); _SFCB_RETURN(iMethodResponse(hdr, NULL)); } rs = iMethodErrResponse(hdr, getErrSegment(resp->rc, @@ -1802,6 +1809,9 @@ handleCimRequest(CimRequestContext * ctx) rs.rc=1; } + if (hdr.binCtx) + free(hdr.binCtx); + // This will be dependent on the type of request being processed. freeCimXmlRequest(hdr); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Tyrel D. <ty...@us...> - 2011-05-11 01:43:01
|
Update of /cvsroot/sblim/gather/plugin In directory vz-cvs-3.sog:/tmp/cvs-serv28398/plugin Modified Files: metricKvm.c metricKvm.readme metricVirt.c metricVirt.h repositoryKvm.c Log Message: Fixed 3300216: new KVM scheduler counter metrics Index: metricVirt.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricVirt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- metricVirt.c 19 Apr 2011 23:09:44 -0000 1.8 +++ metricVirt.c 11 May 2011 01:42:58 -0000 1.9 @@ -30,6 +30,14 @@ #include <stdio.h> #include <string.h> +#define PIDDIR "/var/run/libvirt/qemu/" +#define L_piddir 22 +#define PROC "/proc/" +#define TASK "/task/" +#define SCHED "/sched" +#define L_sched 32 +#define bufsize 4096 + static virConnectPtr conn; static int hyp_type; @@ -62,6 +70,108 @@ } /* ---------------------------------------------------------------------------*/ +/* collectDomainSchedStats */ +/* get scheduler statistics for a given domain */ +/* ---------------------------------------------------------------------------*/ + +static void collectDomainSchedStats(int cnt) +{ + FILE * fd = NULL; + char * pidfile = NULL; + char * tidfile = NULL; + char tmpfile[L_tmpnam]; + char cmdbuf[128]; + char buf[bufsize]; + int * tids = NULL; + int pid = 0; + int i; + + /* default stats to 0 in case of error */ + domain_statistics.cpu_used[cnt] = 0; + domain_statistics.cpu_ready[cnt] = 0; + + /* open libvirts pid file to obtain vm pid */ + pidfile = malloc(sizeof(char *) * + (strlen(domain_statistics.domain_name[cnt]) + L_piddir + 4 + 1)); + sprintf(pidfile, "%s%s.pid", PIDDIR, domain_statistics.domain_name[cnt]); + + if ((fd = fopen(pidfile, "r")) != NULL) { + if (fgets(buf, bufsize, fd) != NULL) { + sscanf(buf, "%d", &pid); + } + fclose(fd); + } + + free(pidfile); + + /* determine thread ids for each vcpu via ps */ + if (pid) { + if (tmpnam(tmpfile)) { + sprintf(cmdbuf, "ps --no-headers -p %d -Lo lwp > %s", pid, tmpfile); + if (system(cmdbuf) == 0) { + if ((fd = fopen(tmpfile, "r")) != NULL) { + /* ignore master thread (vm pid) */ + fgets(buf, bufsize, fd); + + tids = malloc(sizeof(int *) * domain_statistics.vcpus[cnt]); + + for (i = 0; i < domain_statistics.vcpus[cnt]; i++) { + fgets(buf, bufsize, fd); + sscanf(buf, "%d", &tids[i]); + } + fclose(fd); + } + } + remove(tmpfile); + } + } + + /* retrieve scheduler stats for each vcpu/tid */ + if (tids) { + tidfile = malloc(sizeof(char *) * (L_sched + 1)); + + /* for each vcpu/tid grab stats from /proc/$pid/task/$tid/sched */ + for (i = 0; i < domain_statistics.vcpus[cnt]; i++) { + float used, ready; + + if (tmpnam(tmpfile)) { + sprintf(tidfile, "%s%d%s%d%s", PROC, pid, TASK, tids[i], SCHED); + + /* interested in se.sum_exec_runtime and se.wait_sum */ + sprintf(cmdbuf, "cat %s | awk '/exec_runtime/ || /wait_sum/ {print $3}' > %s", + tidfile, tmpfile); + + /* stats are in floating point ms, convert to microseconds */ + if (system(cmdbuf) == 0) { + if ((fd = fopen(tmpfile, "r")) != NULL) { + fgets(buf, bufsize, fd); + sscanf(buf, "%f", &used); + used = used * 1000; + domain_statistics.cpu_used[cnt] += used; + + fgets(buf, bufsize, fd); + sscanf(buf, "%f", &ready); + ready = ready * 1000; + domain_statistics.cpu_ready[cnt] += ready; + + fclose(fd); + } + } + remove(tmpfile); + } + + } + + /* Average the sum of all stats across number of vcpus */ + domain_statistics.cpu_used[cnt] = domain_statistics.cpu_used[cnt] / domain_statistics.vcpus[cnt]; + domain_statistics.cpu_ready[cnt] = domain_statistics.cpu_ready[cnt] / domain_statistics.vcpus[cnt]; + + free(tidfile); + free(tids); + } +} + +/* ---------------------------------------------------------------------------*/ /* collectNodeStats */ /* get node statistics from libvirt API */ /* ---------------------------------------------------------------------------*/ @@ -176,6 +286,8 @@ domain_statistics.vcpus[cnt] = dinfo.nrVirtCpu; domain_statistics.state[cnt] = dinfo.state; + collectDomainSchedStats(cnt); + #ifdef DEBUG fprintf(stderr, "--- %s(%i) : %s (%d)\n\t claimed %lu max %lu\n\t time %f cpus %hu\n", __FILE__, __LINE__, domain_statistics.domain_name[cnt], *ids_ptr, dinfo.memory, dinfo.maxMem, @@ -214,6 +326,8 @@ domain_statistics.cpu_time[cnt] = ((float) dinfo.cpuTime) / 1000000000; domain_statistics.vcpus[cnt] = 0; domain_statistics.state[cnt] = dinfo.state; + domain_statistics.cpu_used[cnt] = 0; + domain_statistics.cpu_ready[cnt] = 0; virDomainFree(domain); @@ -594,3 +708,122 @@ return -1; } +/* ----------------------------------------------------------------------*/ +/* Scheduler Statistic Metrics */ +/* ----------------------------------------------------------------------*/ + +int virtMetricRetrCPUUsedTimeCounter(int mid, MetricReturner mret) +{ + MetricValue *mv = NULL; + +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Retrieving KVM Scheduler CPUUsedTimeCounter\n", + __FILE__, __LINE__); +#endif + + collectDomainStats(); + + if (mret == NULL) { +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Returner pointer is NULL\n", + __FILE__, __LINE__); +#endif + } else { +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Sampling for Scheduler CPUUsedTimeCounter metric\n", + __FILE__, __LINE__); +#endif + + int i; + +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : num_active_domains %d\n", + __FILE__, __LINE__, node_statistics.num_active_domains); +#endif + + for (i = 0; i < node_statistics.total_domains; i++) { + + mv = calloc(1, sizeof(MetricValue) + + sizeof(unsigned long long) + + strlen(domain_statistics.domain_name[i]) + 1); + + if (mv) { + mv->mvId = mid; + mv->mvTimeStamp = time(NULL); + mv->mvDataType = MD_UINT64; + mv->mvDataLength = sizeof(unsigned long long); + mv->mvData = (char *) mv + sizeof(MetricValue); + *(unsigned long long *) mv->mvData = htonll(domain_statistics.cpu_used[i]); + mv->mvResource = (char *) mv + sizeof(MetricValue) + sizeof(unsigned long long); + strcpy(mv->mvResource, domain_statistics.domain_name[i]); + mret(mv); + } + } + + return 1; + } + + return -1; +} + +int virtMetricRetrCPUReadyTimeCounter(int mid, MetricReturner mret) +{ + MetricValue *mv = NULL; + +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Retrieving KVM Scheduler CPUReadyTimeCounter\n", + __FILE__, __LINE__); +#endif + + collectDomainStats(); + + if (mret == NULL) { +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Returner pointer is NULL\n", + __FILE__, __LINE__); +#endif + } else { +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : Sampling for Scheduler CPUReadyTimeCounter metric\n", + __FILE__, __LINE__); +#endif + + int i; + +#ifdef DEBUG + fprintf(stderr, + "--- %s(%i) : num_active_domains %d\n", + __FILE__, __LINE__, node_statistics.num_active_domains); +#endif + + for (i = 0; i < node_statistics.total_domains; i++) { + + mv = calloc(1, sizeof(MetricValue) + + sizeof(unsigned long long) + + strlen(domain_statistics.domain_name[i]) + 1); + + if (mv) { + mv->mvId = mid; + mv->mvTimeStamp = time(NULL); + mv->mvDataType = MD_UINT64; + mv->mvDataLength = sizeof(unsigned long long); + mv->mvData = (char *) mv + sizeof(MetricValue); + *(unsigned long long *) mv->mvData = htonll(domain_statistics.cpu_ready[i]); + mv->mvResource = (char *) mv + sizeof(MetricValue) + sizeof(unsigned long long); + strcpy(mv->mvResource, domain_statistics.domain_name[i]); + mret(mv); + } + } + + return 1; + } + + return -1; +} Index: repositoryKvm.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/repositoryKvm.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- repositoryKvm.c 8 Oct 2010 01:01:34 -0000 1.7 +++ repositoryKvm.c 11 May 2011 01:42:58 -0000 1.8 @@ -50,7 +50,7 @@ /* ---------------------------------------------------------------------------*/ -static MetricCalculationDefinition metricCalcDef[15]; +static MetricCalculationDefinition metricCalcDef[17]; // metric _Internal_CPUTime static MetricCalculator metricCalcCPUTime; @@ -85,10 +85,20 @@ // metric VirtualSystemState static MetricCalculator metricCalcVirtualSystemState; +// metric SchedulerStats +static MetricCalculator metricCalcSchedulerStats; + +// metric SumExecRuntime +// static MetricCalculator metricCalcSumExecRuntime + +// metric WaitSum +// static MetricCalculator metricCalcWaitSum + /* unit definitions */ static char *muKiloBytes = "Kilobytes"; static char *muPercent = "Percent"; +static char *muMicroSeconds = "MicroSeconds"; static char *muMilliSeconds = "MilliSeconds"; static char *muSeconds = "Seconds"; static char *muNA = "N/A"; @@ -295,7 +305,31 @@ metricCalcDef[14].mcCalc = metricCalcVirtualSystemState; metricCalcDef[14].mcUnits = muNA; - *mcnum = 15; + metricCalcDef[15].mcVersion = MD_VERSION; + metricCalcDef[15].mcName = "CPUUsedTimeCounter"; + metricCalcDef[15].mcId = mr(pluginname, metricCalcDef[15].mcName); + metricCalcDef[15].mcMetricType = + MD_PERIODIC | MD_RETRIEVED | MD_POINT; + metricCalcDef[15].mcChangeType = MD_COUNTER; + metricCalcDef[15].mcIsContinuous = MD_TRUE; + metricCalcDef[15].mcCalculable = MD_NONSUMMABLE; + metricCalcDef[15].mcDataType = MD_UINT64; + metricCalcDef[15].mcCalc = metricCalcSchedulerStats; + metricCalcDef[15].mcUnits = muMicroSeconds; + + metricCalcDef[16].mcVersion = MD_VERSION; + metricCalcDef[16].mcName = "CPUReadyTimeCounter"; + metricCalcDef[16].mcId = mr(pluginname, metricCalcDef[16].mcName); + metricCalcDef[16].mcMetricType = + MD_PERIODIC | MD_RETRIEVED | MD_POINT; + metricCalcDef[16].mcChangeType = MD_COUNTER; + metricCalcDef[16].mcIsContinuous = MD_TRUE; + metricCalcDef[16].mcCalculable = MD_NONSUMMABLE; + metricCalcDef[16].mcDataType = MD_UINT64; + metricCalcDef[16].mcCalc = metricCalcSchedulerStats; + metricCalcDef[16].mcUnits = muMicroSeconds; + + *mcnum = 17; *mc = metricCalcDef; return 0; } @@ -637,5 +671,26 @@ } /* ---------------------------------------------------------------------------*/ +/* Scheduler Statistics */ +/* ---------------------------------------------------------------------------*/ + +size_t metricCalcSchedulerStats(MetricValue * mv, + int mnum, void *v, size_t vlen) +{ +#ifdef DEBUG + fprintf(stderr, "Raw Scheduler Statistics\n"); +#endif + + /* plain copy */ + if (mv && (vlen >= mv->mvDataLength) && (mnum == 1) ) { + memcpy(v, mv->mvData, mv->mvDataLength); + *(unsigned long long *) v = ntohll(*(unsigned long long *) v); + return mv->mvDataLength; + } + + return -1; +} + +/* ---------------------------------------------------------------------------*/ /* end of repositoryKvm.c */ /* ---------------------------------------------------------------------------*/ Index: metricVirt.h =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricVirt.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metricVirt.h 19 Apr 2010 23:58:19 -0000 1.4 +++ metricVirt.h 11 May 2011 01:42:58 -0000 1.5 @@ -48,6 +48,8 @@ float cpu_time[MAX_DOMAINS]; unsigned short vcpus[MAX_DOMAINS]; unsigned char state[MAX_DOMAINS]; + unsigned long long cpu_used[MAX_DOMAINS]; + unsigned long long cpu_ready[MAX_DOMAINS]; } domain_statistics; int connectHypervisor(int type); @@ -58,5 +60,7 @@ MetricRetriever virtMetricRetrInternalMemory; MetricRetriever virtMetricRetrHostFreePhysicalMemory; MetricRetriever virtMetricRetrVirtualSystemState; +MetricRetriever virtMetricRetrCPUUsedTimeCounter; +MetricRetriever virtMetricRetrCPUReadyTimeCounter; #endif Index: metricKvm.readme =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricKvm.readme,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metricKvm.readme 4 Aug 2010 23:24:36 -0000 1.4 +++ metricKvm.readme 11 May 2011 01:42:58 -0000 1.5 @@ -32,6 +32,8 @@ - PhysicalMemoryAllocatedToVirtualSystemPercentage - HostMemoryPercentage - VirtualSystemState +- CPUUsedTimeCounter +- CPUReadyTimeCounter plus the following metrics which are only intended for internal usage: - _Internal_CPUTime @@ -132,3 +134,22 @@ Sample Interval : 60 sec CIM Data Type : unit32 Units : None + + +CPUUsedTimeCounter +------------------ + +Metric Type : Point +Sample Interval : 60 sec +CIM Data Type : uint64 +Units : MicroSeconds + + +CPUReadyTimeCounter +------------------- + +Metric Type : Point +Sample Interval : 60 sec +CIM Data Type : uint64 +Units : MicroSeconds + Index: metricKvm.c =================================================================== RCS file: /cvsroot/sblim/gather/plugin/metricKvm.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- metricKvm.c 4 Aug 2010 23:24:36 -0000 1.4 +++ metricKvm.c 11 May 2011 01:42:58 -0000 1.5 @@ -45,7 +45,7 @@ #include <ctype.h> /* --- metric callback retrievers to be exported --- */ -static MetricDefinition metricDef[8]; +static MetricDefinition metricDef[10]; /* --- required plugin functions --- */ int _DefinedMetrics(MetricRegisterId * mr, @@ -141,7 +141,23 @@ metricDef[7].mproc = virtMetricRetrVirtualSystemState; metricDef[7].mdeal = free; - *mdnum = 8; + metricDef[8].mdVersion = MD_VERSION; + metricDef[8].mdName = "CPUUsedTimeCounter"; + metricDef[8].mdReposPluginName = "librepositoryKvm.so"; + metricDef[8].mdId = mr(pluginname, metricDef[8].mdName); + metricDef[8].mdSampleInterval = 60; + metricDef[8].mproc = virtMetricRetrCPUUsedTimeCounter; + metricDef[8].mdeal = free; + + metricDef[9].mdVersion = MD_VERSION; + metricDef[9].mdName = "CPUReadyTimeCounter"; + metricDef[9].mdReposPluginName = "librepositoryKvm.so"; + metricDef[9].mdId = mr(pluginname, metricDef[9].mdName); + metricDef[9].mdSampleInterval = 60; + metricDef[9].mproc = virtMetricRetrCPUReadyTimeCounter; + metricDef[9].mdeal = free; + + *mdnum = 10; } else { *mdnum = 0; } |
From: Tyrel D. <ty...@us...> - 2011-05-11 01:43:00
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv28398 Modified Files: NEWS Log Message: Fixed 3300216: new KVM scheduler counter metrics Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- NEWS 11 May 2011 01:23:52 -0000 1.98 +++ NEWS 11 May 2011 01:42:58 -0000 1.99 @@ -3,6 +3,9 @@ - 3289931 long vm names cause buffer overflow - 3181085 Mandatory Properties not instantiated: CIM_MetricServiceCapa +Features added: +- 3300216 new KVM scheduler counter metrics + Changes in Version 2.2.2 ======================== |
From: Tyrel D. <ty...@us...> - 2011-05-11 01:23:55
|
Update of /cvsroot/sblim/gather In directory vz-cvs-3.sog:/tmp/cvs-serv24555 Modified Files: NEWS Log Message: Fixed 3181085: Mandatory Properties not instantiated CIM_MetricServiceCapa Index: NEWS =================================================================== RCS file: /cvsroot/sblim/gather/NEWS,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- NEWS 19 Apr 2011 23:09:43 -0000 1.97 +++ NEWS 11 May 2011 01:23:52 -0000 1.98 @@ -1,6 +1,7 @@ Bugs fixed: - 3275169 bash error reported in provider bootstrap scripts - 3289931 long vm names cause buffer overflow +- 3181085 Mandatory Properties not instantiated: CIM_MetricServiceCapa Changes in Version 2.2.2 ======================== |
From: Michael Chase-S. <mc...@us...> - 2011-05-10 23:01:36
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv32292 Modified Files: ChangeLog NEWS interopServerProvider.c Log Message: [ 3287789 ] interopServerProvider not conservative when answering reqs Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.582 retrieving revision 1.583 diff -u -d -r1.582 -r1.583 --- NEWS 29 Apr 2011 21:40:50 -0000 1.582 +++ NEWS 10 May 2011 23:01:33 -0000 1.583 @@ -10,6 +10,7 @@ - 3213591 Local intf client abort abnormally on enum filter syntax err - 3291646 Unused var in __NullEvaluate - 3202466 Single item on method param of array type rejected via Local +- 3287789 interopServerProvider not conservative when answering reqs Changes in 1.3.11 ================= Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.655 retrieving revision 1.656 diff -u -d -r1.655 -r1.656 --- ChangeLog 29 Apr 2011 21:40:50 -0000 1.655 +++ ChangeLog 10 May 2011 23:01:33 -0000 1.656 @@ -1,3 +1,8 @@ +2011-05-10 Michael Chase-Salerno <br...@li...> + + * interopServerProvider.c + [ 3287789 ] interopServerProvider not conservative when answering reqs + 2011-04-29 Michael Chase-Salerno <br...@li...> * 20_indication.mof.pre.in, Makefile.am, configure.ac Index: interopServerProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopServerProvider.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- interopServerProvider.c 29 Apr 2011 21:40:50 -0000 1.32 +++ interopServerProvider.c 10 May 2011 23:01:33 -0000 1.33 @@ -1235,7 +1235,8 @@ } // Handle ElementConformstoProfile - if( ( assocClass==NULL ) || ( CMClassPathIsA(_broker,ecpop,assocClass,&rc) == 1 ) ) { + if (( ( assocClass==NULL ) || ( CMClassPathIsA(_broker,ecpop,assocClass,&rc) == 1 ) ) + && (CMClassPathIsA(_broker, cop, "cim_indicationservice", &rc) == 1)){ isop = CMNewObjectPath( _broker, CMGetCharPtr(CMGetNameSpace(cop,&rc)), "CIM_indicationservice", &rc ); rpop = CMNewObjectPath( _broker, "root/interop", "SFCB_RegisteredProfile", &rc ); if (( rpop==NULL ) || (isop==NULL) ) { |
From: Michael Chase-S. <mc...@us...> - 2011-05-10 22:52:46
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via f7f0f0bcc25c4bbe698b254d67c110e4b8d180a9 (commit) via 5576e251d4ed92e758d1771c665573e4b8299283 (commit) via c8a2a0f08a2eddd29fc742ab1216f0c4942f2a47 (commit) via 6e1e3fac9520d099a2a93fc5622d4a7e5471d1c0 (commit) from 821a9359e806ebd5635b293dea70363dc5cc2b2a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f7f0f0bcc25c4bbe698b254d67c110e4b8d180a9 Author: Michael Chase-Salerno <br...@li...> Date: Tue May 10 18:51:40 2011 -0400 3287789 interopServerProvider not conservative when answering reqs commit 5576e251d4ed92e758d1771c665573e4b8299283 Merge: c8a2a0f08a2eddd29fc742ab1216f0c4942f2a47 821a9359e806ebd5635b293dea70363dc5cc2b2a Author: Michael Chase-Salerno <br...@li...> Date: Tue May 10 11:17:35 2011 -0400 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit c8a2a0f08a2eddd29fc742ab1216f0c4942f2a47 Merge: 6e1e3fac9520d099a2a93fc5622d4a7e5471d1c0 0b6802f46940cf94da49aef4bc7bd9f7b92ded87 Author: Michael Chase-Salerno <br...@li...> Date: Tue May 3 16:53:04 2011 -0400 Merge branch 'master' of ssh://sblim.git.sourceforge.net/gitroot/sblim/sfcb commit 6e1e3fac9520d099a2a93fc5622d4a7e5471d1c0 Author: Michael Chase-Salerno <br...@li...> Date: Tue May 3 16:42:53 2011 -0400 3280992 Add systemd file to SFCB sources ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index c3f8bb5..7e93e6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-10 Michael Chase-Salerno <br...@li...> + + * interopServerProvider.c + [ 3287789 ] interopServerProvider not conservative when answering reqs + 2011-05-09 Chris Buccella <buc...@li...> * Makefile.am, brokerEnc.c, brokerUpc.c, cimRequest.c, cimXmlGen.c, diff --git a/interopServerProvider.c b/interopServerProvider.c index ec530c6..67ccafd 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -1395,8 +1395,9 @@ getAssociators(CMPIAssociationMI * mi, } } // Handle ElementConformstoProfile - if ((assocClass == NULL) - || (CMClassPathIsA(_broker, ecpop, assocClass, &rc) == 1)) { + if (((assocClass == NULL) + || (CMClassPathIsA(_broker, ecpop, assocClass, &rc) == 1)) + && (CMClassPathIsA(_broker, cop, "cim_indicationservice", &rc) == 1)) { isop = CMNewObjectPath(_broker, CMGetCharPtr(CMGetNameSpace(cop, &rc)), "CIM_indicationservice", &rc); diff --git a/test/xmltest/ECTP_AIN_bogus.lines b/test/xmltest/ECTP_AIN_bogus.lines new file mode 100644 index 0000000..303c869 --- /dev/null +++ b/test/xmltest/ECTP_AIN_bogus.lines @@ -0,0 +1,3 @@ +<IMETHODRESPONSE NAME="AssociatorNames"> +!<INSTANCENAME CLASSNAME="CIM_IndicationService"> + diff --git a/test/xmltest/ECTP_AIN_bogus.xml b/test/xmltest/ECTP_AIN_bogus.xml new file mode 100644 index 0000000..1d9709e --- /dev/null +++ b/test/xmltest/ECTP_AIN_bogus.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8" ?> +<CIM CIMVERSION="2.0" DTDVERSION="2.0"> +<MESSAGE ID="4711" PROTOCOLVERSION="1.0"> +<SIMPLEREQ><IMETHODCALL NAME="AssociatorNames"> +<LOCALNAMESPACEPATH><NAMESPACE NAME="root"></NAMESPACE> +<NAMESPACE NAME="interop"></NAMESPACE></LOCALNAMESPACEPATH> +<IPARAMVALUE NAME="ObjectName"><INSTANCENAME CLASSNAME="SFCB_RegisteredProfile"><KEYBINDING NAME="instanceid"><KEYVALUE VALUETYPE="string">bogus</KEYVALUE></KEYBINDING></INSTANCENAME></IPARAMVALUE> +</IMETHODCALL></SIMPLEREQ> +</MESSAGE></CIM> hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave B. <bla...@us...> - 2011-05-10 20:24:29
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax In directory vz-cvs-3.sog:/tmp/cvs-serv31911/src/org/sblim/cimclient/internal/cimxml/sax Modified Files: EmbObjHandler.java Log Message: 3281781 - fail to parse Embedded Instance parameter Index: EmbObjHandler.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/sax/EmbObjHandler.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- EmbObjHandler.java 15 Mar 2010 11:28:22 -0000 1.11 +++ EmbObjHandler.java 10 May 2011 20:24:27 -0000 1.12 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -22,6 +22,7 @@ * 2524131 2009-01-21 raman_arora Upgrade client to JDK 1.5 (Phase 1) * 2763216 2009-04-14 blaschke-oss Code cleanup: visible spelling/grammar errors * 2957387 2010-03-03 blaschke-oss EmbededObject XML attribute must not be all uppercases + * 3281781 2011-04-11 blaschke-oss fail to parse Embedded Instance parameter */ package org.sblim.cimclient.internal.cimxml.sax; @@ -278,9 +279,10 @@ if (isEmbeddedInstance() && this.iType.getType() != CIMDataType.OBJECT) throw new SAXException( this.iNodeName + " element is an EmbeddedInstance with non INSTANCE value. " + "It's not valid!"); - if (this.iSession.strictEmbObjParsing() && isEmbeddedClass() - && this.iType.getType() != CIMDataType.CLASS) throw new SAXException(this.iNodeName - + " element is an EmbeddedObject with non CLASS value. It's not valid!"); + if (isEmbeddedClass() && this.iType.getType() != CIMDataType.CLASS + && this.iType.getType() != CIMDataType.OBJECT) throw new SAXException( + this.iNodeName + + " element is an EmbeddedObject with non CLASS/INSTANCE value. It's not valid!"); } private void transformNormObj() throws SAXException { |
From: Dave B. <bla...@us...> - 2011-05-10 20:13:10
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv29888/src/org/sblim/cimclient Modified Files: WBEMConfigurationProperties.java Log Message: 3277928 - CIM-XML tracing cannot be enabled in the field Index: WBEMConfigurationProperties.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/WBEMConfigurationProperties.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- WBEMConfigurationProperties.java 14 Mar 2011 14:04:20 -0000 1.36 +++ WBEMConfigurationProperties.java 10 May 2011 20:13:07 -0000 1.37 @@ -30,6 +30,7 @@ * 3185763 2011-02-25 blaschke-oss Reliable indication support - Phase 1 * 3195069 2011-02-28 blaschke-oss Need support to disable SSL Handshake * 3197423 2011-03-02 blaschke-oss Server authentication with PegasusLocalAuthInfo failing + * 3277928 2011-04-06 blaschke-oss CIM-XML tracing cannot be enabled in the field */ package org.sblim.cimclient; @@ -491,6 +492,31 @@ public static final String CIMXML_TRACING = "sblim.wbem.cimxmlTracing"; /** + * Specifies the stream to use for tracing CIM-XML communication in the + * event the application does not set one via the LogAndTraceManager class. + * This stream can either be standard output (System.out), standard error + * output (System.err) or a filename to be opened by the client. + * + * Note: This property has no effect unless sblim.wbem.cimxmlTracing is set + * to true. + * + * Note: This property has no effect if the application already set the + * stream prior to client initialization. If the application sets the stream + * after client initialization, the stream specified by this property is + * overridden. + * + * Note: If a filename is specified, it is opened and all CIM-XML + * communication is written to it - no checks are made for an existing file + * or for filling up the disk. USE WITH CAUTION. + * + * Type: <code>String</code><br /> + * Recognition: <code>Startup</code><br /> + * Range: <code>System.out, System.err, filename</code><br /> + * Default: <code>none</code><br /> + */ + public static final String CIMXML_TRACE_STREAM = "sblim.wbem.cimxmlTraceStream"; + + /** * <pre> * Tells the XML builder how to sign embedded objects. This is necessary due to * the non-consequent handling of embedded objects on different CIMOMs. |
From: Dave B. <bla...@us...> - 2011-05-10 20:13:09
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util In directory vz-cvs-3.sog:/tmp/cvs-serv29888/src/org/sblim/cimclient/internal/util Modified Files: WBEMConfiguration.java Log Message: 3277928 - CIM-XML tracing cannot be enabled in the field Index: WBEMConfiguration.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfiguration.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- WBEMConfiguration.java 14 Mar 2011 12:52:51 -0000 1.35 +++ WBEMConfiguration.java 10 May 2011 20:13:07 -0000 1.36 @@ -33,6 +33,7 @@ * 3111718 2010-11-18 blaschke-oss org.sblim.cimclient SSL Code is using the wrong SSL Property * 3185763 2011-02-25 blaschke-oss Reliable indication support - Phase 1 * 3195069 2011-02-28 blaschke-oss Need support to disable SSL Handshake + * 3277928 2011-04-06 blaschke-oss CIM-XML tracing cannot be enabled in the field */ package org.sblim.cimclient.internal.util; @@ -823,6 +824,16 @@ } /** + * Returns the CIM-XML trace stream to be used if application does not set + * one of its own + * + * @return The trace stream + */ + public String getCimXmlTraceStream() { + return getProperty(WBEMConfigurationProperties.CIMXML_TRACE_STREAM, null); + } + + /** * Returns the backlog that is tolerated before the thread pool creates an * additional handler * |
Update of /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples In directory vz-cvs-3.sog:/tmp/cvs-serv20226/smpl/org/sblim/cimclient/samples Modified Files: Jsr48OperationSample.java Jsr48IndicationSample.java Jsr48PegasusIndicationSample.java Jsr48PullEnumSample.java Log Message: 3267429 - Samples should close client Index: Jsr48IndicationSample.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Jsr48IndicationSample.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Jsr48IndicationSample.java 11 Mar 2011 13:08:17 -0000 1.11 +++ Jsr48IndicationSample.java 10 May 2011 19:25:24 -0000 1.12 @@ -22,6 +22,7 @@ * 2882448 2009-10-21 blaschke-oss Add WBEMClientConstants from JSR48 * 2956716 2010-03-02 blaschke-oss Jsr48IndicationSample hardcoded namespace * 3190335 2011-02-23 blaschke-oss Erroneous use of SystemName property in samples + * 3267429 2011-04-01 blaschke-oss Samples should close client */ package org.sblim.cimclient.samples; @@ -300,6 +301,7 @@ } else { System.err.println("Listener startup failed. Most probably the port " + LISTENER_PORT + " is not available."); + client.close(); return; } @@ -327,6 +329,7 @@ unsubscribe(client, namespace); // close listener cListener.removeListener(Integer.parseInt(LISTENER_PORT)); + client.close(); System.out.println("Cleaned up."); } Index: Jsr48PullEnumSample.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Jsr48PullEnumSample.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Jsr48PullEnumSample.java 17 Nov 2009 19:39:34 -0000 1.3 +++ Jsr48PullEnumSample.java 10 May 2011 19:25:24 -0000 1.4 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2009 + * (C) Copyright IBM Corp. 2009, 2011 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -14,6 +14,7 @@ * -------------------------------------------------------------------- * 2845211 2009-08-27 raman_arora Pull Enumeration Feature (SAX Parser) * 2882448 2009-10-21 blaschke-oss Add WBEMClientConstants from JSR48 + * 3267429 2011-04-01 blaschke-oss Samples should close client */ package org.sblim.cimclient.samples; @@ -461,6 +462,7 @@ } // if (instance.getProperty("RegisteredName") }// for loop profileInstances.size() }// if (profileInstances != null) + client.close(); } // main private static void printIteratorInstance(CloseableIterator<CIMInstance> iterator, Index: Jsr48PegasusIndicationSample.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Jsr48PegasusIndicationSample.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Jsr48PegasusIndicationSample.java 7 Mar 2011 14:00:41 -0000 1.3 +++ Jsr48PegasusIndicationSample.java 10 May 2011 19:25:24 -0000 1.4 @@ -14,6 +14,7 @@ * ------------------------------------------------------------------------------- * 3182121 2011-02-15 blaschke-oss Add Jsr48PegasusIndicationSample * 3185818 2011-02-18 blaschke-oss indicationOccured URL incorrect + * 3267429 2011-04-01 blaschke-oss Samples should close client */ package org.sblim.cimclient.samples; @@ -341,6 +342,7 @@ } else { System.err.println("Listener startup failed. Most probably the port " + LISTENER_PORT + " is not available."); + client.close(); return; } @@ -379,6 +381,7 @@ unsubscribe(client, namespace); // Close listener cListener.removeListener(Integer.parseInt(LISTENER_PORT)); + client.close(); System.out.println("Cleaned up."); } Index: Jsr48OperationSample.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Jsr48OperationSample.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Jsr48OperationSample.java 11 Mar 2011 13:08:17 -0000 1.11 +++ Jsr48OperationSample.java 10 May 2011 19:25:24 -0000 1.12 @@ -21,6 +21,7 @@ * 2882448 2009-10-21 blaschke-oss Add WBEMClientConstants from JSR48 * 2963502 2010-03-04 blaschke-oss Add XML tracing to sample code * 3190335 2011-02-23 blaschke-oss Erroneous use of SystemName property in samples + * 3267429 2011-04-01 blaschke-oss Samples should close client */ package org.sblim.cimclient.samples; @@ -388,5 +389,6 @@ // delete the instance again client.deleteInstance(path); System.out.println("Instance " + path + " deleted"); + client.close(); } } |
From: Dave B. <bla...@us...> - 2011-05-10 19:12:04
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging In directory vz-cvs-3.sog:/tmp/cvs-serv17902/src/org/sblim/cimclient/internal/logging Modified Files: LogAndTraceBroker.java Log Message: 3252669 - setXmlTraceStream blindly closes previous stream Index: LogAndTraceBroker.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging/LogAndTraceBroker.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- LogAndTraceBroker.java 15 Feb 2011 12:42:35 -0000 1.20 +++ LogAndTraceBroker.java 10 May 2011 19:12:01 -0000 1.21 @@ -23,6 +23,7 @@ * 3001345 2010-05-18 blaschke-oss File handle leaks in HttpSocketFactory and LogAndTraceBroker * 3027618 2010-07-14 blaschke-oss Close files/readers in finally blocks * 3154232 2011-01-13 blaschke-oss EmbeddedObject misspelled in javadoc + * 3252669 2011-03-28 blaschke-oss setXmlTraceStream blindly closes previous stream */ package org.sblim.cimclient.internal.logging; @@ -561,7 +562,8 @@ * CIM-XML debugging is disabled. */ public void setXmlTraceStream(OutputStream pStream) { - if (this.iXmlTraceStream != null) { + if ((this.iXmlTraceStream != null) && (!this.iXmlTraceStream.equals(System.out)) + && (!this.iXmlTraceStream.equals(System.err))) { try { this.iXmlTraceStream.close(); } catch (IOException e) { |
From: Chris B. <buc...@us...> - 2011-05-09 22:27:33
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcCommon - Common lib for SFCB/SFCC". The branch, master has been updated via 18eaba2dfca46f5d016b3a523481c5e840662933 (commit) via 8bf11802f4ef5702ba83912717e7afd67ca1a7d8 (commit) from 2c169c4e412011c958605cd61a99d05466721af7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 18eaba2dfca46f5d016b3a523481c5e840662933 Author: buccella <buc...@li...> Date: Mon May 9 18:27:53 2011 -0400 added genericlist commit 8bf11802f4ef5702ba83912717e7afd67ca1a7d8 Author: buccella <buc...@li...> Date: Mon May 9 18:25:35 2011 -0400 added genericlist ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 304584f..a110cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-09 Chris Buccella <buc...@li...> + + * Makefile.am, configure.ac, sfcUtil/utilFactory.c, + sfcUtil/utilHashtable.c, sfcUtil/utilft.h, + genericlist.c, genericlist.c: + added genericlist.* and made newList() take arguments to + specify memory management functions + 2011-02-10 Michael Chase-Salerno <br...@li...> * All files diff --git a/Makefile.am b/Makefile.am index d943348..03eb97e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,7 @@ sfcCommonlib_LTLIBRARIES = \ libsfcUtil.la libsfcUtil_la_SOURCES = \ + sfcUtil/genericlist.c \ sfcUtil/hashtable.c \ sfcUtil/utilFactory.c \ sfcUtil/utilHashtable.c \ @@ -49,7 +50,7 @@ libsfcUtil_la_SOURCES = \ sfcUtil/libsfcUtil.Versions libsfcUtil_la_LDFLAGS = -Wl,--version-script,$(srcdir)/sfcUtil/libsfcUtil.Versions -inst_HEADERS= sfcUtil/hashtable.h sfcUtil/utilft.h +inst_HEADERS= sfcUtil/hashtable.h sfcUtil/utilft.h sfcUtil/genericlist.h pretty: for i in `find $(srcdir) -name \*.[ch]`; do \ diff --git a/configure.ac b/configure.ac index bab122e..1e564c7 100644 --- a/configure.ac +++ b/configure.ac @@ -31,8 +31,6 @@ AC_PROG_LIBTOOL # Checks for libraries. # FIXME: Replace `main' with a function in `-ldl': AC_CHECK_LIB([dl], [main]) -# FIXME: Replace `main' with a function in `-lpthread': -AC_CHECK_LIB([pthread], [main]) # Checks for header files. AC_HEADER_STDC diff --git a/sfcUtil/genericlist.c b/sfcUtil/genericlist.c new file mode 100644 index 0000000..b56b9ca --- /dev/null +++ b/sfcUtil/genericlist.c @@ -0,0 +1,733 @@ + +/* + * genericList.c + * + * (C) Copyright IBM Corp. 2005 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Keith Pomakis <po...@po...> + * Contributions: Adrian Schuur <sc...@de...> + * + * Description: + * + * list implementation. + * + */ + + /************************************************************************ + ************************************************************************* + ** ** + ** Generic List Library ** + ** ** + ** by Keith Pomakis ** + ** kpp...@je... ** + ** ** + ** Spring, 1994 ** + ** ** + ************************************************************************* + ************************************************************************/ + +#include <stdio.h> +#include <stdlib.h> +#include "genericlist.h" + +#ifdef THINK_C /* what is this? */ +#define malloc NewPtr +#endif + +#define NEW(x) ((x *) emalloc(sizeof(x))) + +static void initialize_list(Generic_list * list); +static void initialize_sorted_list(Generic_list * list, + int (*lt) (void *a, void *b)); +static void destroy_list(Generic_list * list); +static void add_to_beginning(Generic_list list, void *pointer); +static void add_to_end(Generic_list list, void *pointer); +// static void add_to_list(Generic_list list, void *pointer); +static void *remove_from_beginning(Generic_list list); +static void *remove_from_end(Generic_list list); +static void *remove_from_list(Generic_list list, void *pointer); +static void remove_all(Generic_list list); +// static void *peek_at_beginning(Generic_list list); +// static void *peek_at_end(Generic_list list); + +static void *first_in_list(Generic_list list); +static void *next_in_list(Generic_list list); +static void *current_in_list(Generic_list list); +static void *remove_current(Generic_list list); +static void *previous_in_list(Generic_list list); +static void *last_in_list(Generic_list list); +static void reset_to_beginning(Generic_list list); +// static void reset_to_end(Generic_list list); + +static int num_of_objects(const Generic_list list); +static int is_empty(const Generic_list list); +static int is_in_list(const Generic_list list, const void *pointer); +static Generic_list copy_list(Generic_list list); + +/* + * static void perform_on_list(Generic_list list, void (*fn) (void + * *pointer, void *args),void *args); static void *first_that(Generic_list + * list, int (*fn) (const void *pointer, const void *args), const void + * *args); static void *next_that(Generic_list list, int (*fn) (const void + * *pointer, const void *args), const void *args); static void + * *previous_that(Generic_list list, int (*fn) (const void *pointer, const + * void *args), const void *args); static void *last_that(Generic_list + * list, int (*fn) (const void *pointer, const void *args), const void + * *args); static Generic_list all_such_that(Generic_list list, int (*fn) + * (const void *pointer, const void *args), const void *args); static void + * remove_all_such_that(Generic_list list, int (*fn) (const void *pointer, + * const void *args), const void *args); + */ + +static char *module = "generic_list"; + +static void *emalloc(unsigned int n); + +/****************************************************************************/ + +static void +initialize_list(Generic_list * list) +{ + list->info = NEW(Generic_list_info); + + list->info->pre_element.pointer = NULL; + list->info->pre_element.previous = &list->info->pre_element; + list->info->pre_element.next = &list->info->post_element; + list->info->post_element.pointer = NULL; + list->info->post_element.previous = &list->info->pre_element; + list->info->post_element.next = &list->info->post_element; + + list->info->current = &list->info->pre_element; + list->info->deleted_element.pointer = NULL; + list->info->lt = NULL; + list->info->num_of_elements = 0; +} + +/****************************************************************************/ + +static void +initialize_sorted_list(Generic_list * list, int (*lt) (void *a, void *b)) +{ + initialize_list(list); + list->info->lt = lt; +} + +/****************************************************************************/ + +static void +destroy_list(Generic_list * list) +{ + remove_all(*list); + free((void *) list->info); +} + +/****************************************************************************/ + +static void +add_to_beginning(Generic_list list, void *pointer) +{ + Generic_list_element *element; + + if (!pointer) { + // mlogf(M_ERROR, M_SHOW, "%s: NULL pointer passed 1\n", module); + return; + exit(EXIT_FAILURE); + } + + element = NEW(Generic_list_element); + element->next = list.info->pre_element.next; + element->previous = &list.info->pre_element; + element->pointer = pointer; + + list.info->pre_element.next->previous = element; + list.info->pre_element.next = element; + + list.info->num_of_elements++; +} + +/****************************************************************************/ + +static void +add_to_end(Generic_list list, void *pointer) +{ + Generic_list_element *element; + + if (!pointer) { + // mlogf(M_ERROR, M_SHOW, "%s: NULL pointer passed 2\n", module); + // abort(); + return; + exit(EXIT_FAILURE); + } + + element = NEW(Generic_list_element); + element->next = &list.info->post_element; + element->previous = list.info->post_element.previous; + element->pointer = pointer; + + list.info->post_element.previous->next = element; + list.info->post_element.previous = element; + + list.info->num_of_elements++; +} + +/****************************************************************************/ +/* + * static void add_to_list(Generic_list list, void *pointer) { + * Generic_list_element *element, *new_element; + * + * if (list.info->lt) { if (!pointer) { mlogf(M_ERROR,M_SHOW, "%s: NULL + * pointer passed\n", module); exit(EXIT_FAILURE); } + * + * element = list.info->pre_element.next; while (element != + * &list.info->post_element && (*list.info->lt) (element->pointer, + * pointer)) element = element->next; + * + * new_element = NEW(Generic_list_element); new_element->next = element; + * new_element->previous = element->previous; new_element->pointer = + * pointer; + * + * element->previous->next = new_element; element->previous = new_element; + * + * list.info->num_of_elements++; } else add_to_end(list, pointer); } + */ +/****************************************************************************/ + +static void * +remove_from_list(Generic_list list, void *pointer) +{ + Generic_list_element *element; + + element = list.info->post_element.previous; + + while (element != &list.info->pre_element && element->pointer != pointer) + element = element->previous; + + if (element == &list.info->pre_element) + /* + * No such element was found. + */ + return NULL; + + if (element == list.info->current) { + list.info->deleted_element.previous = element->previous; + list.info->deleted_element.next = element->next; + list.info->current = &list.info->deleted_element; + } + + element->previous->next = element->next; + element->next->previous = element->previous; + + free(element); + list.info->num_of_elements--; + + return pointer; +} + +/****************************************************************************/ + +static void * +remove_from_beginning(Generic_list list) +{ + Generic_list_element *element; + void *pointer; + + if (list.info->num_of_elements == 0) + return NULL; + + element = list.info->pre_element.next; + if (element == list.info->current) + list.info->current = &list.info->pre_element; + + pointer = element->pointer; + list.info->pre_element.next = element->next; + element->next->previous = &list.info->pre_element; + + free(element); + list.info->num_of_elements--; + + return pointer; +} + +/****************************************************************************/ + +static void * +remove_from_end(Generic_list list) +{ + Generic_list_element *element; + void *pointer; + + if (list.info->num_of_elements == 0) + return NULL; + + element = list.info->post_element.previous; + if (element == list.info->current) + list.info->current = &list.info->post_element; + + pointer = element->pointer; + list.info->post_element.previous = element->previous; + element->previous->next = &list.info->post_element; + + free(element); + list.info->num_of_elements--; + + return pointer; +} + +/****************************************************************************/ + +static void * +remove_current(Generic_list list) +{ + Generic_list_element *element; + void *pointer; + + element = list.info->current; + if (element->pointer == NULL) + return NULL; + + list.info->deleted_element.previous = element->previous; + list.info->deleted_element.next = element->next; + list.info->current = &list.info->deleted_element; + + pointer = element->pointer; + element->next->previous = element->previous; + element->previous->next = element->next; + + free(element); + list.info->num_of_elements--; + + return pointer; +} + +/****************************************************************************/ + +static void +remove_all(Generic_list list) +{ + Generic_list_element *element; + + element = list.info->pre_element.next; + while (element && element != &list.info->post_element) { + element = element->next; + if (element) + free(element->previous); + } + + list.info->pre_element.next = &list.info->post_element; + list.info->post_element.previous = &list.info->pre_element; + list.info->num_of_elements = 0; +} + +/****************************************************************************/ +/* + * static void *peek_at_beginning(Generic_list list) { return + * list.info->pre_element.next->pointer; } + */ +/****************************************************************************/ +/* + * static void *peek_at_end(Generic_list list) { return + * list.info->post_element.previous->pointer; } + */ +/****************************************************************************/ + +static void * +first_in_list(Generic_list list) +{ + list.info->current = list.info->pre_element.next->next->previous; + return list.info->current->pointer; +} + +/****************************************************************************/ + +static void * +current_in_list(Generic_list list) +{ + return list.info->current->pointer; +} + +/****************************************************************************/ + +static void * +last_in_list(Generic_list list) +{ + list.info->current = list.info->post_element.previous->previous->next; + return list.info->current->pointer; +} + +/****************************************************************************/ + +static void * +next_in_list(Generic_list list) +{ + list.info->current = list.info->current->next; + return list.info->current->pointer; +} + +/****************************************************************************/ + +static void * +previous_in_list(Generic_list list) +{ + list.info->current = list.info->current->previous; + return list.info->current->pointer; +} + +/****************************************************************************/ + +static void +reset_to_beginning(Generic_list list) +{ + list.info->current = &list.info->pre_element; +} + +/****************************************************************************/ +/* + * static void reset_to_end(Generic_list list) { list.info->current = + * &list.info->post_element; } + */ +/****************************************************************************/ + +static int +num_of_objects(const Generic_list list) +{ + return list.info->num_of_elements; +} + +/****************************************************************************/ + +static int +is_empty(const Generic_list list) +{ + return (list.info->num_of_elements == 0); +} + +/****************************************************************************/ + +static int +is_in_list(const Generic_list list, const void *pointer) +{ + Generic_list_element *element; + + element = list.info->pre_element.next; + + while (element != &list.info->post_element + && element->pointer != pointer) + element = element->next; + + return (element != &list.info->post_element); +} + +/****************************************************************************/ + +static Generic_list +copy_list(Generic_list list) +{ + Generic_list list_copy; + Generic_list_element *element; + + initialize_sorted_list(&list_copy, list.info->lt); + element = list.info->pre_element.next; + while (element != &list.info->post_element) { + add_to_end(list_copy, element->pointer); + element = element->next; + } + + return list_copy; +} + +/****************************************************************************/ +/* + * static void perform_on_list(Generic_list list, void (*fn) (void + * *pointer, void *args), void *args) { Generic_list_element *element; + * + * element = list.info->pre_element.next; while (element != + * &list.info->post_element) { (*fn) (element->pointer, args); element = + * element->next; } } + */ +/****************************************************************************/ +/* + * static void *first_that(Generic_list list, int (*fn) (const void + * *pointer, const void *args), const void *args) { Generic_list_element + * *element; + * + * element = list.info->pre_element.next; while (element != + * &list.info->post_element && !(*fn) (element->pointer, args)) { element + * = element->next; } + * + * if (element->pointer) list.info->current = element; + * + * return element->pointer; } + */ +/****************************************************************************/ +/* + * static void *next_that(Generic_list list, int (*fn) (const void + * *pointer, const void *args), const void *args) { Generic_list_element + * *element; + * + * element = list.info->current->next; while (element != + * &list.info->post_element && !(*fn) (element->pointer, args)) { element + * = element->next; } + * + * if (element->pointer) list.info->current = element; + * + * return element->pointer; } + */ +/****************************************************************************/ +/* + * static void *previous_that(Generic_list list, int (*fn) (const void + * *pointer, const void *args), const void *args) { Generic_list_element + * *element; + * + * element = list.info->current->previous; while (element != + * &list.info->pre_element && !(*fn) (element->pointer, args)) { element = + * element->previous; } + * + * if (element->pointer) list.info->current = element; + * + * return element->pointer; } + */ +/****************************************************************************/ +/* + * static void *last_that(Generic_list list, int (*fn) (const void + * *pointer, const void *args), const void *args) { Generic_list_element + * *element; + * + * element = list.info->post_element.previous; while (element != + * &list.info->pre_element && !(*fn) (element->pointer, args)) { element = + * element->previous; } + * + * if (element->pointer) list.info->current = element; + * + * return element->pointer; } + */ +/****************************************************************************/ +/* + * static Generic_list all_such_that(Generic_list list, int (*fn) (const + * void *pointer, const void *args), const void *args) { Generic_list + * list_copy; Generic_list_element *element; + * + * initialize_sorted_list(&list_copy, list.info->lt); element = + * list.info->pre_element.next; while (element != + * &list.info->post_element) { if ((*fn) (element->pointer, args)) + * add_to_end(list_copy, element->pointer); element = element->next; } + * + * return list_copy; } + */ +/****************************************************************************/ +/* + * static void remove_all_such_that(Generic_list list, int (*fn) (const + * void *pointer, const void *args), const void *args) { void *obj; + * + * reset_to_beginning(list); while ((obj = next_in_list(list))) if ((*fn) + * (obj, args)) remove_current(list); } + */ + +/****************************************************************************/ +/****************************************************************************/ +/** **/ +/** Internal functions **/ +/** **/ +/****************************************************************************/ +/****************************************************************************/ + +static void * +emalloc(unsigned int n) +{ + void *ptr; + + ptr = (void *) malloc(n); + if (ptr == NULL) { + // mlogf(M_ERROR, M_SHOW, "%s: error allocating memory\n", module); + exit(EXIT_FAILURE); + } + return ptr; +} + +static void +listRelease(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + destroy_list(&l); + if (ul->ft->memUnlink) ul->ft->memUnlink(ul->mem_state); + free(ul); +} + +static UtilList * +listClone(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + UtilList *nul = NEW(UtilList); + *nul = *ul; + nul->hdl = copy_list(l).info; + return nul; +} + +static void +listClear(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + remove_all(l); +} + +static unsigned long +listSize(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return num_of_objects(l); +} + +static int +listIsEmpty(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return is_empty(l); +} + +static int +listContains(UtilList * ul, const void *elm) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return is_in_list(l, elm); +} + +static void +listAppend(UtilList * ul, const void *elm) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + add_to_end(l, (void *) elm); +} + +static void +listPrepend(UtilList * ul, const void *elm) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + add_to_beginning(l, (void *) elm); +} + +static void +listAdd(UtilList * ul, const void *elm) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + add_to_beginning(l, (void *) elm); +} + +static void * +listGetFirst(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + reset_to_beginning(l); + return first_in_list(l); +} + +static void * +listGetLast(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return last_in_list(l); +} + +static void * +listGetNext(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return next_in_list(l); +} + +static void * +listGetPrevious(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return previous_in_list(l); +} + +static void * +listGetCurrent(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return current_in_list(l); +} + +static void * +listRemoveFirst(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return remove_from_beginning(l); +} + +static void * +listRemoveLast(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return remove_from_end(l); +} + +static void * +listRemoveCurrent(UtilList * ul) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return remove_current(l); +} + +static void * +listRemoveThis(UtilList * ul, void *elm) +{ + Generic_list l = *(Generic_list *) & ul->hdl; + return remove_from_list(l, elm); +} + +Util_List_FT UtilList_ft = { + 2, + listRelease, + // listMemUnlink, /* should be set by SFCB */ + NULL, /* memUnlink (used in SFCB) */ + listClone, + listClear, + listSize, + listIsEmpty, + listContains, + listAppend, + listPrepend, + listAdd, + listGetFirst, + listGetLast, + listGetNext, + listGetPrevious, + listGetCurrent, + listRemoveFirst, + listRemoveLast, + listRemoveCurrent, + listRemoveThis +}; + +Util_List_FT *UtilListFT = &UtilList_ft; + +UtilList * +newList(void* memAddFunc, void* memReleaseFunc) +{ + UtilList ul; + + ul.ft = UtilListFT; + initialize_list((Generic_list *) & ul.hdl); + ul.ft->memUnlink = memReleaseFunc; + + if (memAddFunc) { /* SFCB does this */ + UtilList* (*memLink)(UtilList*); + memLink = memAddFunc; + return (*memLink)(&ul); + } + else { /* SFCC does this */ + return memcpy(malloc(sizeof(ul)),&ul,sizeof(ul)); + } +} +/* MODELINES */ +/* DO NOT EDIT BELOW THIS COMMENT */ +/* Modelines are added by 'make pretty' */ +/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ +/* vi:set ts=2 sts=2 sw=2 expandtab: */ diff --git a/sfcUtil/genericlist.h b/sfcUtil/genericlist.h new file mode 100644 index 0000000..bb98c58 --- /dev/null +++ b/sfcUtil/genericlist.h @@ -0,0 +1,95 @@ + +/* + * genericList.h + * + * (C) Copyright IBM Corp. 2005 + * + * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE + * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE + * CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT. + * + * You can obtain a current copy of the Eclipse Public License from + * http://www.opensource.org/licenses/eclipse-1.0.php + * + * Author: Keith Pomakis <po...@po...> + * Contributions: Adrian Schuur <sc...@de...> + * + * Description: + * + * list implementation. + * + */ + + /************************************************************************ + ************************************************************************* + ** ** + ** Generic List Library ** + ** ** + ** by Keith Pomakis ** + ** kpp...@je... ** + ** ** + ** Spring, 1994 ** + ** ** + ************************************************************************* + ************************************************************************/ + +#ifndef GENERIC_LIST_DEFINED +#define GENERIC_LIST_DEFINED + +#include "utilft.h" +#include <string.h> + +typedef struct GLE_struct { + void *pointer; + struct GLE_struct *previous; + struct GLE_struct *next; +} Generic_list_element; + +typedef struct { + Generic_list_element *current; + Generic_list_element pre_element, + post_element, + deleted_element; + int (*lt) (void *a, void *b); + unsigned int num_of_elements; +} Generic_list_info; + +typedef struct { + Generic_list_info *info; +} Generic_list; + +#define Generic_stack Generic_list +#define Generic_queue Generic_list + +/****************************************************************************/ + +/* + * Stack operations + */ + +#define initialize_stack initialize_list +#define destroy_stack destroy_list +#define push add_to_beginning +#define pop remove_from_beginning +#define peek_at_top peek_at_beginning +#define copy_stack copy_list + +/* + * Queue operations + */ + +#define initialize_queue initialize_list +#define destroy_queue destroy_list +#define enqueue add_to_end +#define dequeue remove_from_beginning +#define dequeue_all remove_all +#define peek_at_head peek_at_beginning +#define peek_at_tail peek_at_end +#define copy_queue copy_list + +#endif /* GENERIC_LIST_DEFINED */ +/* MODELINES */ +/* DO NOT EDIT BELOW THIS COMMENT */ +/* Modelines are added by 'make pretty' */ +/* -*- Mode: C; c-basic-offset: 2; indent-tabs-mode: nil; -*- */ +/* vi:set ts=2 sts=2 sw=2 expandtab: */ diff --git a/sfcUtil/utilFactory.c b/sfcUtil/utilFactory.c index e4b1dfb..044e9bd 100644 --- a/sfcUtil/utilFactory.c +++ b/sfcUtil/utilFactory.c @@ -24,10 +24,11 @@ #include <stdlib.h> #include <ctype.h> #include <string.h> +#include "genericlist.h" extern UtilHashTable *newHashTable(long buckets, long opt); extern UtilHashTable *newHashTableDefault(long buckets); -extern UtilList *newList(); +extern UtilList *newList(); /* coming from genericlist */ extern UtilStringBuffer *newStringBuffer(int s); static Util_Factory_FT ift = { diff --git a/sfcUtil/utilHashtable.c b/sfcUtil/utilHashtable.c index 4e1ed2d..d479938 100644 --- a/sfcUtil/utilHashtable.c +++ b/sfcUtil/utilHashtable.c @@ -112,7 +112,6 @@ newHashTableDefault(long buckets) { UtilHashTable *ht = (UtilHashTable *) malloc(sizeof(UtilHashTable)); void *t = HashTableCreate(buckets); -printf("MCS common\n"); ht->hdl = t; ht->ft = UtilHashTableFT; @@ -132,8 +131,6 @@ newHashTable(long buckets, long opt) void (*keyRelease) (void *key) = NULL; void (*valueRelease) (void *value) = NULL; -printf("MCS common\n"); - ht->hdl = t; ht->ft = UtilHashTableFT; diff --git a/sfcUtil/utilft.h b/sfcUtil/utilft.h index 54954d3..cf585b7 100644 --- a/sfcUtil/utilft.h +++ b/sfcUtil/utilft.h @@ -115,6 +115,8 @@ extern "C" { int version; void (*release) (UtilList * ul); + void (*memUnlink) + (int i); UtilList *(*clone) (UtilList * ul); void (*clear) hooks/post-receive -- sfcCommon - Common lib for SFCB/SFCC |
From: Michael Chase-S. <mc...@us...> - 2011-05-03 20:50:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SFCB - Small Footprint CIM Broker". The branch, master has been updated via 0b6802f46940cf94da49aef4bc7bd9f7b92ded87 (commit) from 18fb48116e9ccd8787eee6dda92443d321575c5b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0b6802f46940cf94da49aef4bc7bd9f7b92ded87 Author: Michael Chase-Salerno <br...@li...> Date: Tue May 3 16:49:36 2011 -0400 3280992 Add systemd file to SFCB sources ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index facb18a..c3fbffe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-03 Michael Chase-Salerno <br...@li...> + + * configure.ac, Makefile.am, sblim-sfcb.service.pre.in + [ 3280992 ] Add systemd file to SFCB sources + 2011-05-02 Michael Chase-Salerno <br...@li...> * configure.ac diff --git a/Makefile.am b/Makefile.am index 11e6e2c..6e3d36a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,7 @@ initdir=$(sysconfdir)/init.d pamdir=$(sysconfdir)/pam.d sfcblibdir=$(libdir)/sfcb cmpilibdir=$(libdir)/cmpi +systemddir=$(prefix)/share/systemd MANFILES=man/genSslCert.1 man/getSchema.1 man/sfcbd.1 man/sfcbmof.1 \ man/sfcbrepos.1 man/sfcbstage.1 man/sfcbunstage.1 man/sfcbuuid.1 \ @@ -424,7 +425,8 @@ man_MANS=$(MANFILES) EXTRA_DIST=sfcb.cfg.pre.in sfcb.spec sfcbrepos.sh.in sfcbstage.sh.in \ sfcbunstage.sh.in sfcbuuid.sh.in sfcb.init-redhat.in sfcb.init-suse.in \ - sfcb.init-none.in cimXmlParser.c footprint.pl test cmpi-devel + sfcb.init-none.in cimXmlParser.c footprint.pl test cmpi-devel \ + sblim-sfcb.service.pre.in dist_sfcbdata_SCRIPTS=genSslCert.sh getSchema.sh test/stageschema.sh @@ -489,11 +491,13 @@ else sed -e s?SETTABLE?FALSE?g $< > $@ endif - -sfcb: sfcb.$(INIT_STYLE) +sfcb: sfcb.$(INIT_STYLE) sblim-sfcb.service sed -e s?$$\{prefix\}?$(prefix)?g \ -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ +sblim-sfcb.service: sblim-sfcb.service.pre + sed -e s?$$\{exec_prefix\}?$(prefix)?g $< > $@ + providerRegister: providerRegister.c touch $@ @@ -501,6 +505,7 @@ unittest: cd test && sh check_all.sh install-data-local: + if test -d $(systemddir); then cp $(srcdir)/sblim-sfcb.service $(systemddir); fi; test -d $(DESTDIR)$(sfcbstatedir)/registration/repository || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/registration/repository test -d $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop test -d $(DESTDIR)$(sfcbstatedir)/stage/regs || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/regs @@ -521,6 +526,7 @@ endif uninstall-local: rm -f $(DESTDIR)$(sfcbstatedir)/stage/default.reg rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop/10_interop.mof + rm -f $(systemddir)/sblim-sfcb.service if INDICATIONS rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop/20_indication.mof rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/indication.mof @@ -532,7 +538,7 @@ endif clean-local: rm -f sfcbrepos sfcbstage sfcbunstage sfcbuuid sfcb.cfg getSchema.sh sfcb \ sfcb.init-redhat sfcb.init-suse sfcb.init-none sfcb-dox.conf \ - cimXmlParserProcessed.c \ + cimXmlParserProcessed.c sblim-sfcb.service \ *.gcno *.gcda *.gcov $(MANFILES) test/TestProviders/tests/RIModIS.XML rm -rf doc/* coverage/ diff --git a/NEWS b/NEWS index 241a6c6..f604cc7 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Changes in 1.4.2 New features: - 3190623 Set *IsSettable propperties to false for IndicationService +- 3280992 Add systemd file to SFCB sources Bugs fixed: diff --git a/configure.ac b/configure.ac index 7a4bfc9..6b02171 100644 --- a/configure.ac +++ b/configure.ac @@ -551,7 +551,7 @@ AM_CONDITIONAL(LOCAL_CONNECT_ONLY,[test "$enable_local_connect_only" == "yes"]) AC_CONFIG_FILES([Makefile sfcb.spec sfcbrepos.sh sfcbstage.sh sfcbunstage.sh sfcbuuid.sh sfcb.cfg.pre getSchema.sh.pre 20_indication.mof.pre - sfcb.init-redhat sfcb.init-suse sfcb.init-none default.reg + sfcb.init-redhat sfcb.init-suse sfcb.init-none default.reg sblim-sfcb.service.pre man/genSslCert.1.pre man/sfcbmof.1.pre man/sfcbunstage.1.pre man/sfcbuuid.1.pre man/getSchema.1.pre man/sfcbrepos.1.pre man/wbemcat.1.pre diff --git a/sblim-sfcb.service.pre.in b/sblim-sfcb.service.pre.in new file mode 100644 index 0000000..3b49da3 --- /dev/null +++ b/sblim-sfcb.service.pre.in @@ -0,0 +1,9 @@ +[Unit] +Description=Small Footprint CIM Broker Service +After=syslog.target + +[Service] +ExecStart=${exec_prefix}/sbin/sfcbd + +[Install] +WantedBy=multi-user.target hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2011-05-03 19:24:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcCommon - Common lib for SFCB/SFCC". The branch, master has been updated via 2c169c4e412011c958605cd61a99d05466721af7 (commit) from 0311c5d0fe31e230d2d4dd7f7e71aa22f1cc316f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2c169c4e412011c958605cd61a99d05466721af7 Author: buccella <buc...@li...> Date: Tue May 3 15:24:47 2011 -0400 Added COPYING ----------------------------------------------------------------------- Summary of changes: diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..f61d34d --- /dev/null +++ b/COPYING @@ -0,0 +1,88 @@ +Eclipse Public License - v 1.0 + +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. DEFINITIONS + +"Contribution" means: + +a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and +b) in the case of each subsequent Contributor: + +i) changes to the Program, and + +ii) additions to the Program; + +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. + +"Contributor" means any person or entity that distributes the Program. + +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +"Program" means the Contributions distributed in accordance with this Agreement. + +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. + +2. GRANT OF RIGHTS + +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +3. REQUIREMENTS + +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: + +a) it complies with the terms and conditions of this Agreement; and + +b) its license agreement: + +i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + +ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + +iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + +iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. + +When the Program is made available in source code form: + +a) it must be made available under this Agreement; and + +b) a copy of this Agreement must be included with each copy of the Program. + +Contributors may not remove or alter any copyright notices contained within the Program. + +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. + +4. COMMERCIAL DISTRIBUTION + +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. NO WARRANTY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. DISCLAIMER OF LIABILITY + +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. GENERAL + +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. + +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. + + hooks/post-receive -- sfcCommon - Common lib for SFCB/SFCC |