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: Michael Chase-S. <mc...@us...> - 2012-04-19 21:45:56
|
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 dad5ce9b2815aa84033cf316398259c2dd295720 (commit) from 6a6bbcdd5891ff53584c10428d214d097e1a9300 (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 dad5ce9b2815aa84033cf316398259c2dd295720 Author: Michael Chase-Salerno <br...@li...> Date: Thu Apr 19 17:45:21 2012 -0400 [ 3513390 ] Enforce LD and subscription limits For LDs only ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 18d3534..921b1ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-04-19 Michael Chase-Salerno <br...@li...> + + * control.c, indCIMXMLHandler.c, interopServerProvider.c, + sfcb.cfg.pre.in, test/TestProviders/tests/Makefile.am, + test/TestProviders/tests/limitTest.sh: + [ 3513390 ] Enforce LD and subscription limits + (max for LD only) + 2012-04-16 Narasimhma Sharoff <nsh...@us...> * brokerOs.c, brokerUpc.c, native.h: diff --git a/NEWS b/NEWS index 9541a3a..1cd82fb 100644 --- a/NEWS +++ b/NEWS @@ -94,6 +94,7 @@ Changes in 1.3.15 New Features: - 3501314 Add dynamic logging and syslog output to sfcb trace - 3517530 Implement mark, release routines in CMPIBrokerMemFT +- 3513390 Enforce LD and subscription limits Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call diff --git a/control.c b/control.c index 3198f99..ab20a3a 100644 --- a/control.c +++ b/control.c @@ -128,6 +128,8 @@ Control init[] = { {"SubscriptionRemovalAction",1,"2"}, {"indicationDeliveryThreadLimit",1,"30"}, {"indicationDeliveryThreadTimeout",1,"0"}, + {"MaxListenerDestinations",1,"100"}, + {"MaxActiveSubscriptions",1,"100"}, }; diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index 33b593b..1db59da 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -49,6 +49,7 @@ extern ExpSegments exportIndicationReq(CMPIInstance *ci, char *id); extern void memLinkObjectPath(CMPIObjectPath * op); static const CMPIBroker *_broker; +static int LDcount=-1; static int interOpNameSpace(const CMPIObjectPath * cop, CMPIStatus *st) @@ -348,7 +349,14 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi, if (interOpNameSpace(cop, &st) == 0) _SFCB_RETURN(st); - internalProviderGetInstance(cop, &st); + CMPIInstance *ciLocal = CMClone(ci, NULL); + memLinkInstance(ciLocal); + CMPIObjectPath* copLocal = CMClone(cop, NULL); + memLinkObjectPath(copLocal); + + setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); + + internalProviderGetInstance(copLocal, &st); if (st.rc == CMPI_RC_ERR_FAILED) _SFCB_RETURN(st); if (st.rc == CMPI_RC_OK) { @@ -356,12 +364,6 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi, _SFCB_RETURN(st); } - CMPIInstance *ciLocal = CMClone(ci, NULL); - memLinkInstance(ciLocal); - CMPIObjectPath* copLocal = CMClone(cop, NULL); - memLinkObjectPath(copLocal); - - setCCN(copLocal,ciLocal,"CIM_ComputerSystem"); CMPIString *sysname=ciLocal->ft->getProperty(ciLocal,"SystemName",&st).value.string; if (sysname == NULL || sysname->hdl == NULL) { @@ -410,6 +412,16 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi, CMSetProperty(ciLocal, "persistencetype", &persistenceType, CMPI_uint16); if (CMClassPathIsA(_broker, copLocal, "cim_listenerdestination", NULL)) { + + // check destination count + long cfgmax; + getControlNum("MaxListenerDestinations", &cfgmax); + if (LDcount+1 > cfgmax) { + setStatus(&st,CMPI_RC_ERR_FAILED,"Instance creation would exceed MaxListenerDestinations limit"); + CMRelease(ciLocal); + _SFCB_RETURN(st); + } + //get the creation timestamp struct timeval tv; struct timezone tz; @@ -440,12 +452,12 @@ IndCIMXMLHandlerCreateInstance(CMPIInstanceMI * mi, CMSetProperty(ciLocal, "SequenceContext", &scontext, CMPI_string); CMPIValue zarro = {.sint64 = -1 }; CMSetProperty(ciLocal, "LastSequenceNumber", &zarro, CMPI_sint64); + LDcount++; } CMPIString *str = CDToString(_broker, copLocal, NULL); CMPIString *ns = CMGetNameSpace(copLocal, NULL); - _SFCB_TRACE(1, - ("--- handler %s %s", (char *) ns->hdl, (char *) str->hdl)); + _SFCB_TRACE(1,("--- handler %s %s", (char *) ns->hdl, (char *) str->hdl)); in = CMNewArgs(_broker, NULL); CMAddArg(in, "handler", &ciLocal, CMPI_instance); @@ -542,6 +554,7 @@ IndCIMXMLHandlerDeleteInstance(CMPIInstanceMI * mi, if (st.rc == CMPI_RC_OK) { st = InternalProviderDeleteInstance(NULL, ctx, rslt, cop); + LDcount--; } _SFCB_RETURN(st); @@ -975,6 +988,53 @@ int refillRetryQ (const CMPIContext * ctx) _SFCB_RETURN(0); } + +int countLD (const CMPIContext * ctx) { + _SFCB_ENTER(TRACE_INDPROVIDER, "countLD"); + CMPIEnumeration *enm; + CMPIStatus st = { CMPI_RC_OK, NULL }; + LDcount++; // Mark it initialized + + // Enumerate the destinations + CMPIContext * ctxLocal = prepareUpcall((CMPIContext *)ctx); + CMPIObjectPath *ref=CMNewObjectPath(_broker,"root/interop","cim_listenerdestination",&st); + enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); + while(enm && enm->ft->hasNext(enm, &st)) { + LDcount++; + enm->ft->getNext(enm, &st); + } + ref = CMNewObjectPath(_broker,"root/interop","cim_listenerdestinationcimxml",&st); + enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); + while(enm && enm->ft->hasNext(enm, &st)) { + LDcount++; + enm->ft->getNext(enm, &st); + } + ref = CMNewObjectPath(_broker,"root/interop","cim_indicationhandlercimxml",&st); + enm = _broker->bft->enumerateInstanceNames(_broker, ctxLocal, ref, &st); + while(enm && enm->ft->hasNext(enm, &st)) { + LDcount++; + enm->ft->getNext(enm, &st); + } + + CMRelease(ref); + CMRelease(ctxLocal); + _SFCB_TRACE(1,("--- initial count of destinations: %d.",LDcount)); + + _SFCB_RETURN(0); +} + +int initIndCIMXML(const CMPIContext * ctx) +{ + _SFCB_ENTER(TRACE_INDPROVIDER, "initIndCIMXML"); + //Refill the queue if there were any from the last run + refillRetryQ(ctx); + if ( LDcount == -1 ) { + //Get the count of ListenerDestinations + countLD(ctx); + } + _SFCB_RETURN(0); +} + CMPIStatus IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, const CMPIContext *ctx, @@ -1106,7 +1166,7 @@ IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, _SFCB_RETURN(st); } -CMInstanceMIStub(IndCIMXMLHandler, IndCIMXMLHandler, _broker, refillRetryQ(ctx) ); +CMInstanceMIStub(IndCIMXMLHandler, IndCIMXMLHandler, _broker, initIndCIMXML(ctx) ); CMMethodMIStub(IndCIMXMLHandler, IndCIMXMLHandler, _broker, CMNoHook); /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ diff --git a/interopServerProvider.c b/interopServerProvider.c index 8e3893b..39b21de 100644 --- a/interopServerProvider.c +++ b/interopServerProvider.c @@ -551,6 +551,7 @@ IndServiceCapabilitiesProviderEnumInstances(CMPIInstanceMI * mi, CMPIStatus st = { CMPI_RC_OK, NULL }; CMPIObjectPath *op; CMPIInstance *ci = NULL; + long ctl=0; _SFCB_ENTER(TRACE_PROVIDERS, "IndServiceCapabilitiesProviderEnumInstances"); @@ -566,6 +567,15 @@ IndServiceCapabilitiesProviderEnumInstances(CMPIInstanceMI * mi, CMAddKey(op, "InstanceID", "CIM:SFCB_ISC", CMPI_chars); ci = CBGetInstance(_broker, ctxLocal, op, properties, &st); + // Get the config options for these max vals and add them to the instance + getControlNum("MaxListenerDestinations", &ctl); + CMPIValue max = {.uint32 = ctl }; + CMSetProperty(ci,"MaxListenerDestinations",&max,CMPI_uint32); + + getControlNum("MaxActiveSubscriptions", &ctl); + max.uint32 = ctl; + CMSetProperty(ci,"MaxActiveSubscriptions",&max,CMPI_uint32); + CMReturnInstance(rslt, ci); CMReturnDone(rslt); diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index 6d116a9..f7d9cf4 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -321,3 +321,14 @@ sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH ## 4, ignore (do nothing) #SubscriptionRemovalAction: 2 +## The maximum number of listener destinations that are allowable. +## This threshold will prevent creation of new listener destinations, +## but will not delete them if more are found. +## Default is 100. +#MaxListenerDestinations: 100 + +## The maximum number of ACTIVE subscriptions allowed. +## This threshold will prevent new activations, +## but will not deactivate them if more are found. +## Default is 100. +#MaxActiveSubscriptions: 100 diff --git a/test/TestProviders/tests/Makefile.am b/test/TestProviders/tests/Makefile.am index e89ab6d..6510b62 100644 --- a/test/TestProviders/tests/Makefile.am +++ b/test/TestProviders/tests/Makefile.am @@ -32,4 +32,4 @@ endif #Some wbemcat tests export SRCDIR=$(srcdir) -TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh +TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh $(srcdir)/limitTest.sh hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2012-04-19 17:39:57
|
Update of /cvsroot/sblim/sfcb/test/TestProviders/tests In directory vz-cvs-3.sog:/tmp/cvs-serv22147/test/TestProviders/tests Modified Files: Makefile.am Added Files: limitTest.sh Log Message: 3513390 Enforce LD and subscription limits Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/test/TestProviders/tests/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 29 Feb 2012 23:12:45 -0000 1.4 +++ Makefile.am 19 Apr 2012 17:39:55 -0000 1.5 @@ -32,4 +32,4 @@ #Some wbemcat tests export SRCDIR=$(srcdir) -TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh +TESTS = $(srcdir)/xmltest.sh $(srcdir)/IndRetryTest.sh $(srcdir)/limitTest.sh --- NEW FILE: limitTest.sh --- #!/bin/sh # ============================================================================ # limitTest # # (C) Copyright IBM Corp. 2012 # # 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: Michael Chase-Salerno, <br...@li...> # Description: # Simple test program to create many instances and verify # that max limits are enforced # ============================================================================ sendxml () { # Sends the xml file given as argument 1 to wbemcat with appropriate # credentials and protocol. The output of wbemcat will be directed to # argument 2 if [ -z $SFCB_TEST_PORT ] then SFCB_TEST_PORT=5988 fi if [ -z $SFCB_TEST_PROTOCOL ] then SFCB_TEST_PROTOCOL="http" fi if [ "$SFCB_TEST_USER" != "" ] && [ "$SFCB_TEST_PASSWORD" != "" ]; then wbemcat -u $SFCB_TEST_USER -pwd $SFCB_TEST_PASSWORD -p $SFCB_TEST_PORT -t $SFCB_TEST_PROTOCOL $1 2>&1 > $2 else wbemcat -p $SFCB_TEST_PORT -t $SFCB_TEST_PROTOCOL $1 2>&1 > $2 fi if [ $? -ne 0 ]; then echo "FAILED to send CIM-XML request $1" return 1 fi } cleanup () { # Cleans up all created instances CLPRE='<?xml version="1.0" encoding="utf-8"?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> <SIMPLEREQ> <IMETHODCALL NAME="DeleteInstance"> <LOCALNAMESPACEPATH> <NAMESPACE NAME="root"/> <NAMESPACE NAME="interop"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="InstanceName"> <INSTANCENAME CLASSNAME="CIM_IndicationHandlerCIMXML"> <KEYBINDING NAME="SystemCreationClassName"> <KEYVALUE>CIM_ComputerSystem</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="SystemName"> <KEYVALUE>localhost.localdomain</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="CreationClassName"> <KEYVALUE>CIM_IndicationHandlerCIMXML</KEYVALUE> </KEYBINDING> <KEYBINDING NAME="Name"> <KEYVALUE>' CLPOST='</KEYVALUE> </KEYBINDING> </INSTANCENAME> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM>' j=1 while [ $j -le $lim ] do XML=$CLPRE"limitTest_"$j$CLPOST echo $XML > ./limitTest.xml sendxml ./limitTest.xml /dev/null j=$((j+1)) done XML=$CLPRE"limitTest_final"$CLPOST echo $XML > ./limitTest.xml sendxml ./limitTest.xml /dev/null rm ./limitTest.xml rm ./limitTest.result } # Start of main TESTDIR=. lim=100 # Check for wbemcat utility if ! which wbemcat > /dev/null; then echo " Cannot find wbemcat. Please check your PATH" exit 1 fi if ! touch ./limitTest.xml > /dev/null; then echo " Cannot create files, check permissions" exit 1 fi # # First check that the limit is respected for LDs # PRE='<?xml version="1.0" encoding="utf-8"?> <CIM CIMVERSION="2.0" DTDVERSION="2.0"> <MESSAGE ID="4711" PROTOCOLVERSION="1.0"> <SIMPLEREQ> <IMETHODCALL NAME="CreateInstance"> <LOCALNAMESPACEPATH> <NAMESPACE NAME="root"/> <NAMESPACE NAME="interop"/> </LOCALNAMESPACEPATH> <IPARAMVALUE NAME="NewInstance"> <INSTANCE CLASSNAME="CIM_IndicationHandlerCIMXML"> <PROPERTY NAME="SystemName" TYPE="string"> <VALUE>localhost.localdomain</VALUE> </PROPERTY> <PROPERTY NAME="Name" TYPE="string"> <VALUE>' POST='</VALUE> </PROPERTY> <PROPERTY NAME="Destination" TYPE="string"> <VALUE>file:///tmp/SFCB_Listener.txt</VALUE> </PROPERTY> </INSTANCE> </IPARAMVALUE> </IMETHODCALL> </SIMPLEREQ> </MESSAGE> </CIM>' # Create 100 Listener Destinations j=1 echo -n " Testing LD limit ..." while [ $j -le $lim ] do # Use "limitTest_xxx" as the name XML=$PRE"limitTest_"$j$POST echo $XML > ./limitTest.xml sendxml ./limitTest.xml limitTest.result if [ $? -ne 0 ] then # This means an actual wbemcat failure, echo " Create $j FAILED" cleanup exit 1; fi grep "limitTest" ./limitTest.result >/dev/null 2>&1 if [ $? -ne 0 ] then # This means one of the early creates failed for # some reason. Might be ok, so just flag it # and continue. It's possible other instances # existed before the test was run. echo -n " Create $j failed ... continuing ..." fi j=$((j+1)) done # Create a final instance that should exceed the # maximum, so it should fail. XML=$PRE"limitTest_final"$POST echo $XML > ./limitTest.xml sendxml ./limitTest.xml ./limitTest.result # If the instance name is in the result, it succeeded, # which is bad. grep "limitTest_final" ./limitTest.result >/dev/null 2>&1 if [ $? -eq 0 ] then echo " limit not enforced. FAILED" cleanup exit 1; fi echo " PASSED" cleanup exit 0 |
From: Dave B. <bla...@us...> - 2012-04-19 11:22:11
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem In directory vz-cvs-3.sog:/tmp/cvs-serv19810/src/org/sblim/cimclient/internal/wbem Modified Files: WBEMClientCIMXML.java Log Message: 3515180 - JSR48 log dir/file should handle UNIX/Win separators Index: WBEMClientCIMXML.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/WBEMClientCIMXML.java,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- WBEMClientCIMXML.java 19 Apr 2012 11:11:24 -0000 1.69 +++ WBEMClientCIMXML.java 19 Apr 2012 11:22:08 -0000 1.70 @@ -59,6 +59,7 @@ * 3496355 2012-03-02 blaschke-oss JSR48 1.0.0: add new WBEMClientConstants * 3514537 2012-04-03 blaschke-oss TCK: execQueryInstances requires boolean, not Boolean * 3514685 2012-04-03 blaschke-oss TCK: getProperty must return default values + * 3515180 2012-04-05 blaschke-oss JSR48 log dir/file should handle UNIX/Win separators */ package org.sblim.cimclient.internal.wbem; @@ -328,6 +329,23 @@ return this.iConfiguration.getDomainProperties(); } + private int getLastSeparator(String path) { + if (path == null) return -1; + + int last = -1; + int sepUnix = path.lastIndexOf('/'); + int sepWin = path.lastIndexOf('\\'); + + if (sepUnix != -1 && sepWin != -1) { + last = sepUnix > sepWin ? sepUnix : sepWin; + } else if (sepUnix != -1) { + last = sepUnix; + } else if (sepWin != -1) { + last = sepWin; + } + return last; + } + public String getProperty(String pKey) { if (pKey.startsWith("javax.wbem.")) { // Process JSR48 properties @@ -342,13 +360,13 @@ } else if (pKey.equals(WBEMClientConstants.PROP_LOG_DIR)) { String SblimKey = this.iConfiguration.getLogFileLocation(); if (SblimKey == null) return null; - int i = SblimKey.lastIndexOf(File.separatorChar); - return i != -1 ? SblimKey.substring(0, i) : null; + int lastSep = getLastSeparator(SblimKey); + return lastSep == -1 ? null : SblimKey.substring(0, lastSep); } else if (pKey.equals(WBEMClientConstants.PROP_LOG_FILENAME)) { String SblimKey = this.iConfiguration.getLogFileLocation(); if (SblimKey == null) return null; - int i = SblimKey.lastIndexOf(File.separatorChar); - return i != -1 ? SblimKey.substring(i + 1) : SblimKey; + int lastSep = getLastSeparator(SblimKey); + return lastSep == -1 ? SblimKey : SblimKey.substring(lastSep + 1); } else if (pKey.equals(WBEMClientConstants.PROP_LOG_NUM_FILES)) { return Integer.toString(this.iConfiguration.getLogFileCount()); } else if (pKey.equals(WBEMClientConstants.PROP_TIMEOUT)) { |
From: Dave B. <bla...@us...> - 2012-04-19 11:11:27
|
Update of /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/util In directory vz-cvs-3.sog:/tmp/cvs-serv15469/utst/org/sblim/cimclient/unittest/util Modified Files: WBEMConfigurationTest.java Log Message: 3514685 - TCK: getProperty must return default values Index: WBEMConfigurationTest.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/utst/org/sblim/cimclient/unittest/util/WBEMConfigurationTest.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- WBEMConfigurationTest.java 14 Mar 2012 13:12:19 -0000 1.15 +++ WBEMConfigurationTest.java 19 Apr 2012 11:11:25 -0000 1.16 @@ -22,6 +22,7 @@ * 2884718 2009-10-23 blaschke-oss Merge JSR48 and SBLIM client properties * 2930341 2010-01-12 blaschke-oss Sync up WBEMClientConstants with JSR48 1.0.0 * 3496355 2012-03-02 blaschke-oss JSR48 1.0.0: add new WBEMClientConstants + * 3514685 2012-04-03 blaschke-oss TCK: getProperty must return default values */ package org.sblim.cimclient.unittest.util; @@ -241,32 +242,44 @@ String pathRelativeLong2 = dirRelativeLong + File.separator + file2; String invalidProperty = "javax.wbem.client.log.name"; + System.getProperties().remove(WBEMConfigurationProperties.LOG_FILE_LEVEL); + System.getProperties().remove(WBEMConfigurationProperties.LOG_DEBUG); + System.getProperties().remove(WBEMConfigurationProperties.LOG_CONSOLE_LEVEL); + System.getProperties().remove(WBEMConfigurationProperties.LOG_FILE_SIZE_LIMIT); + System.getProperties().remove(WBEMConfigurationProperties.LOG_FILE_LOCATION); + System.getProperties().remove(WBEMConfigurationProperties.LOG_FILE_COUNT); + System.getProperties().remove(WBEMConfigurationProperties.HTTP_TIMEOUT); + System.getProperties().remove(WBEMConfigurationProperties.HTTP_USE_CHUNKING); + System.getProperties().remove(WBEMConfigurationProperties.KEYSTORE_PATH); + System.getProperties().remove(WBEMConfigurationProperties.KEYSTORE_PASSWORD); + System.getProperties().remove(WBEMConfigurationProperties.TRUSTSTORE_PATH); + WBEMClientSBLIM client = (WBEMClientSBLIM) WBEMClientFactory .getClient(WBEMClientConstants.PROTOCOL_CIMXML); client.initialize(new CIMObjectPath("https", "127.0.0.1", "5989", "root", null, null), new Subject(), null); - // All JSR48 properties should be null with new client + // All JSR48 properties should be defaults with new client verify("Uninit enab con", EQUAL, client - .getProperty(WBEMClientConstants.PROP_ENABLE_CONSOLE_LOGGING), null); + .getProperty(WBEMClientConstants.PROP_ENABLE_CONSOLE_LOGGING), "0"); verify("Uninit enab dbg", EQUAL, client.getProperty(WBEMClientConstants.PROP_ENABLE_DEBUG), - null); + "0"); verify("Uninit enab file", EQUAL, client - .getProperty(WBEMClientConstants.PROP_ENABLE_FILE_LOGGING), null); + .getProperty(WBEMClientConstants.PROP_ENABLE_FILE_LOGGING), "0"); verify("Uninit byte limit", EQUAL, client - .getProperty(WBEMClientConstants.PROP_LOG_BYTE_LIMIT), null); + .getProperty(WBEMClientConstants.PROP_LOG_BYTE_LIMIT), "5242880"); verify("Uninit log dir", EQUAL, client.getProperty(WBEMClientConstants.PROP_LOG_DIR), null); verify("Uninit log file", EQUAL, client.getProperty(WBEMClientConstants.PROP_LOG_FILENAME), - null); + WBEMConfigurationDefaults.LOG_FILE_LOCATION); verify("Uninit num files", EQUAL, client - .getProperty(WBEMClientConstants.PROP_LOG_NUM_FILES), null); - verify("Uninit timeout", EQUAL, client.getProperty(WBEMClientConstants.PROP_TIMEOUT), null); + .getProperty(WBEMClientConstants.PROP_LOG_NUM_FILES), "3"); + verify("Uninit timeout", EQUAL, client.getProperty(WBEMClientConstants.PROP_TIMEOUT), "0"); verify("Uninit chunking", EQUAL, client - .getProperty(WBEMClientConstants.PROPERTY_WBEM_CHUNKING), null); + .getProperty(WBEMClientConstants.PROPERTY_WBEM_CHUNKING), "1"); verify("Uninit keystore", EQUAL, client .getProperty(WBEMClientConstants.PROP_CLIENT_KEYSTORE), null); verify("Uninit keystore passwd", EQUAL, client - .getProperty(WBEMClientConstants.PROP_CLIENT_KEYSTORE_PASSWORD), null); + .getProperty(WBEMClientConstants.PROP_CLIENT_KEYSTORE_PASSWORD), ""); verify("Uninit truststore", EQUAL, client .getProperty(WBEMClientConstants.PROP_CLIENT_TRUSTSTORE), null); |
From: Dave B. <bla...@us...> - 2012-04-19 10:45:20
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv3356 Modified Files: NEWS Log Message: 3514537 - TCK: execQueryInstances requires boolean, not Boolean Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.283 retrieving revision 1.284 diff -u -d -r1.283 -r1.284 --- NEWS 16 Apr 2012 13:21:50 -0000 1.283 +++ NEWS 19 Apr 2012 10:45:18 -0000 1.284 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3514537 TCK: execQueryInstances requires boolean, not Boolean 3513357 Handle multiple CDATAs in CimXmlSerializer 3513347 TCK: CIMObjectPath allows empty string 3513343 TCK: CIMObjectPath must validate XML schema name |
From: Dave H. <hel...@us...> - 2012-04-18 04:52:19
|
Update of /cvsroot/sblim/wbemcli In directory vz-cvs-3.sog:/tmp/cvs-serv14319 Modified Files: ChangeLog CimXml.cpp NEWS Log Message: Fixed 3519016: wbemcli does not support EmbeddedObject attr of PARAMVALUE Index: NEWS =================================================================== RCS file: /cvsroot/sblim/wbemcli/NEWS,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- NEWS 17 Apr 2012 16:17:02 -0000 1.42 +++ NEWS 18 Apr 2012 04:52:16 -0000 1.43 @@ -2,6 +2,7 @@ ======================== Bugs: +- 3519016 wbemcli does not support EmbeddedObject attr of PARAMVALUE - 3514126 wbemcli does not compile with GCC 4.7 - 3324380 support optional CIMType in KEYVALUE element - 3216622 wbemcli throws parser error on CDATA string value Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/wbemcli/ChangeLog,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ChangeLog 17 Apr 2012 16:17:02 -0000 1.36 +++ ChangeLog 18 Apr 2012 04:52:16 -0000 1.37 @@ -1,3 +1,9 @@ +2012-04-18 Dave Heller <hel...@us...> + + * CimXml.cpp, NEWS: + + Fixed 3519016: wbemcli does not support EmbeddedObject attr of PARAMVALUE + 2012-04-17 Dave Heller <hel...@us...> * CimXml.h, CimCurl.cpp, NEWS, contributions.txt: Index: CimXml.cpp =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimXml.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- CimXml.cpp 22 Jun 2011 05:58:39 -0000 1.71 +++ CimXml.cpp 18 Apr 2012 04:52:16 -0000 1.72 @@ -960,10 +960,14 @@ sb += ": "; rvl->getReturnData()->toStringBuffer(sb,q); } - if (useNl) sb += "\n"; - else sb += " "; - if (pvll) { - pvll->toStringBuffer(sb,q); + char *sep; + if (useNl) sep = (char*)"\n"; + else sep = (char*)", "; + // This ensures separators are properly printed. Only print sep after rvl if + // more data is to follow, and pass the proper separator to the method call. + if (pvll && !pvll->empty()) { + sb += sep; + pvll->toStringBuffer(sb,sep,q); } } @@ -1673,9 +1677,10 @@ bool ParamvalueXml::initialized(false); void ParamvalueXml::initialize() { - elm.attr = StringArray(2); + elm.attr = StringArray(3); elm.attr[0] = string("NAME"); elm.attr[1] = string("PARAMTYPE"); + elm.attr[2] = string("EmbeddedObject"); initialized=true; } @@ -1701,7 +1706,7 @@ if (!initialized) initialize(); XmlAttr attr; attr.eTagFound = 0; - attr.attr=StringArray(2); + attr.attr=StringArray(3); char *tag; if (xb.tagEquals("PARAMVALUE")) { @@ -1726,7 +1731,8 @@ void ParamvalueXml::toStringBuffer(string &sb, const char *q) { sb += name; - sb += ":"; + sb += " (" + type + ")"; + sb += ": "; sb += q; if (val) val->toStringBuffer(sb,q); } |
From: Dave H. <hel...@us...> - 2012-04-17 16:17:05
|
Update of /cvsroot/sblim/wbemcli In directory vz-cvs-3.sog:/tmp/cvs-serv20056 Modified Files: ChangeLog CimCurl.cpp CimXml.h NEWS contributions.txt Log Message: Fixed 3514126: wbemcli does not compile with GCC 4.7 Index: NEWS =================================================================== RCS file: /cvsroot/sblim/wbemcli/NEWS,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- NEWS 22 Jun 2011 05:58:39 -0000 1.41 +++ NEWS 17 Apr 2012 16:17:02 -0000 1.42 @@ -2,6 +2,7 @@ ======================== Bugs: +- 3514126 wbemcli does not compile with GCC 4.7 - 3324380 support optional CIMType in KEYVALUE element - 3216622 wbemcli throws parser error on CDATA string value - 2991546 Core dumps when property contains value within "[]" Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/wbemcli/ChangeLog,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- ChangeLog 13 Jul 2011 21:22:36 -0000 1.35 +++ ChangeLog 17 Apr 2012 16:17:02 -0000 1.36 @@ -1,3 +1,10 @@ +2012-04-17 Dave Heller <hel...@us...> + + * CimXml.h, CimCurl.cpp, NEWS, contributions.txt: + + Fixed 3514126: wbemcli does not compile with GCC 4.7 + (Patch by Klaus Kampf) + 2011-06-21 Tyrel Datwyler <ty...@us...> * CimXml.cpp, NEWS, contributions.txt: Index: CimXml.h =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimXml.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- CimXml.h 22 Jun 2011 05:33:02 -0000 1.38 +++ CimXml.h 17 Apr 2012 16:17:02 -0000 1.39 @@ -129,9 +129,9 @@ public: ArrayXml() {} ArrayXml<T> * clone() const { return new ArrayXml<T>(*this);} - void add(const T& t) { push_back(t); } + void add(const T& t) { this->push_back(t); } #if !defined(GCC_VERSION) || GCC_VERSION >= 3000 - T& operator[] (size_type n) {return at(n);} + T& operator[] (size_type n) {return this->at(n);} const T& operator[] (size_type n) const {return at(n);} #endif T *get(int n) { return &(*this)[n]; } Index: contributions.txt =================================================================== RCS file: /cvsroot/sblim/wbemcli/contributions.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- contributions.txt 22 Jun 2011 05:58:39 -0000 1.8 +++ contributions.txt 17 Apr 2012 16:17:02 -0000 1.9 @@ -18,6 +18,10 @@ ******************************************************************************** +04/17/2012 by Klaus Kampf +-------------------------------- +[ 3514126 ] wbemcli does not compile with GCC 4.7 + 06/21/2011 by Aruna Venkataraman -------------------------------- [ 2991546 ] Core dumps when property contains value within "[]" Index: CimCurl.cpp =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimCurl.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- CimCurl.cpp 4 Mar 2009 19:10:54 -0000 1.13 +++ CimCurl.cpp 17 Apr 2012 16:17:02 -0000 1.14 @@ -28,6 +28,7 @@ #endif #include "CimCurl.h" +#include <unistd.h> // for getpass() extern int useNl; extern int dumpXml; |
From: Narasimha S. <nsh...@us...> - 2012-04-16 16:07:21
|
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 6a6bbcdd5891ff53584c10428d214d097e1a9300 (commit) from 3f1adc4d18eff30f4829ef38e3f654c14c532185 (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 6a6bbcdd5891ff53584c10428d214d097e1a9300 Author: Narasimha Sharoff <nsh...@us...> Date: Mon Apr 16 09:06:02 2012 -0700 [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT Signed-off-by: Narasimha Sharoff <nsh...@us...> ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 6b84f0e..18d3534 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-16 Narasimhma Sharoff <nsh...@us...> + + * brokerOs.c, brokerUpc.c, native.h: + [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT + 2012-04-13 Chris Buccella <buc...@li...> * Makefile.am, cimRequest.c, httpAdapter.c, httpComm.c, providerDrv.c, diff --git a/NEWS b/NEWS index 3c35c75..9541a3a 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,7 @@ Changes in 1.3.15 New Features: - 3501314 Add dynamic logging and syslog output to sfcb trace +- 3517530 Implement mark, release routines in CMPIBrokerMemFT Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call diff --git a/brokerOs.c b/brokerOs.c index 4749129..8d73a0b 100644 --- a/brokerOs.c +++ b/brokerOs.c @@ -245,6 +245,52 @@ CMPIBrokerExtFT brokerExt_FT = { }; CMPIBrokerExtFT *CMPI_BrokerExt_Ftab = &brokerExt_FT; + + +/* + * ----------------------------------------------- + * CMPIBrokerMemFT -memory specific CIMOM routines + * ------------------------------------------------ +*/ +extern void *markHeap(); +extern void releaseHeap(void *); + +/* The following two are wrappers for markHeap() and releaseHeap() + * in support.c which allows for provider calls via broker->mft functions +*/ +static CMPIGcStat *mark(const CMPIBroker *mb, CMPIStatus *rc) +{ + return((CMPIGcStat *)markHeap()); +} + +static CMPIStatus release(const CMPIBroker *mb, const CMPIGcStat *gc) +{ + CMPIStatus st = {CMPI_RC_OK, NULL}; + releaseHeap((void *)gc); + return(st); +} + + +CMPIBrokerMemFT brokerMem_FT = { + CMPICurrentVersion, + mark, + release, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +CMPIBrokerMemFT *CMPI_BrokerMem_Ftab = &brokerMem_FT; + /* MODELINES */ /* DO NOT EDIT BELOW THIS COMMENT */ /* Modelines are added by 'make pretty' */ diff --git a/brokerUpc.c b/brokerUpc.c index 8953a2c..6f50c19 100644 --- a/brokerUpc.c +++ b/brokerUpc.c @@ -124,7 +124,7 @@ deliverIndication(const CMPIBroker * mb, const CMPIContext *ctx, NativeSelectExp *se = activFilters; while (se) { - void *hc = markHeap(); /* 3497209:78376 */ + CMPIGcStat *hc = (void *)(mb->mft->mark(mb, &st)); /* Check for matching FROM class */ for (x=0; x<se->qs->fcNext; x++) { if (CMClassPathIsA(mb, indop, se->qs->fClasses[x], &st)) { @@ -132,7 +132,7 @@ deliverIndication(const CMPIBroker * mb, const CMPIContext *ctx, break; } } - releaseHeap(hc); /* 3497209:78376 - relase objs that are no longer reqd */ + mb->mft->release(mb, hc); if (classMatch && se->exp.ft->evaluate(&se->exp, ind, &st)) { /* * apply a propertyfilter in case the query is not "SELECT * FROM @@ -1334,13 +1334,14 @@ static CMPIBrokerFT request_FT = { CMPIBrokerFT *RequestFT = &request_FT; extern CMPIBrokerExtFT brokerExt_FT; +extern CMPIBrokerMemFT brokerMem_FT; static CMPIBroker _broker = { NULL, &request_FT, &native_brokerEncFT, &brokerExt_FT, - NULL + &brokerMem_FT }; CMPIBroker *Broker = &_broker; diff --git a/native.h b/native.h index 342f817..ce5b443 100644 --- a/native.h +++ b/native.h @@ -113,6 +113,7 @@ void native_release_CMPIContext(CMPIContext *); CMPIContext *native_clone_CMPIContext(const CMPIContext *ctx); extern CMPIBrokerExtFT *CMPI_BrokerExt_Ftab; +extern CMPIBrokerMemFT *CMPI_BrokerMem_Ftab; MsgSegment setObjectPathMsgSegment(const CMPIObjectPath * op); CMPIInstance *relocateSerializedInstance(void *area); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave B. <bla...@us...> - 2012-04-16 13:21:52
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv30424 Modified Files: NEWS Log Message: 3513357 - Handle multiple CDATAs in CimXmlSerializer Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.282 retrieving revision 1.283 diff -u -d -r1.282 -r1.283 --- NEWS 16 Apr 2012 13:14:40 -0000 1.282 +++ NEWS 16 Apr 2012 13:21:50 -0000 1.283 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3513357 Handle multiple CDATAs in CimXmlSerializer 3513347 TCK: CIMObjectPath allows empty string 3513343 TCK: CIMObjectPath must validate XML schema name 3513349 TCK: CIMDataType must not accept null string |
From: Dave B. <bla...@us...> - 2012-04-16 13:14:42
|
Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv29999/src/javax/cim Modified Files: CIMObjectPath.java Log Message: 3513347 - TCK: CIMObjectPath allows empty string Index: CIMObjectPath.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMObjectPath.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- CIMObjectPath.java 16 Apr 2012 12:52:59 -0000 1.29 +++ CIMObjectPath.java 16 Apr 2012 13:14:40 -0000 1.30 @@ -29,6 +29,7 @@ * 3496349 2012-03-02 blaschke-oss JSR48 1.0.0: add CIMObjectPath getKeyValue * 3510090 2012-03-23 blaschke-oss Fix CIMObjectPath.toString() inconsistencies * 3513343 2012-03-31 blaschke-oss TCK: CIMObjectPath must validate XML schema name + * 3513347 2012-03-31 blaschke-oss TCK: CIMObjectPath allows empty string */ package javax.cim; @@ -292,6 +293,8 @@ URI uri; if (pObjectPath == null) throw new IllegalArgumentException("ObjectPath is null!"); + if (pObjectPath.trim().length() == 0) throw new IllegalArgumentException( + "ObjectPath is empty!"); try { uri = URI.parse(pObjectPath); |
From: Dave B. <bla...@us...> - 2012-04-16 13:08:48
|
Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv29718/src/javax/cim Modified Files: Tag: Experimental CIMObjectPath.java Log Message: 3513347 - TCK: CIMObjectPath allows empty string Index: CIMObjectPath.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMObjectPath.java,v retrieving revision 1.11.2.19 retrieving revision 1.11.2.20 diff -u -d -r1.11.2.19 -r1.11.2.20 --- CIMObjectPath.java 31 Mar 2012 16:00:40 -0000 1.11.2.19 +++ CIMObjectPath.java 16 Apr 2012 13:08:46 -0000 1.11.2.20 @@ -29,7 +29,7 @@ * 3496349 2012-03-02 blaschke-oss JSR48 1.0.0: add CIMObjectPath getKeyValue * 3510090 2012-03-23 blaschke-oss Fix CIMObjectPath.toString() inconsistencies * 3513343 2012-03-31 blaschke-oss TCK: CIMObjectPath must validate XML schema name - * 3513347 2012-03-31 blaschke-oss TCK: CIMObjectPath allows empty string + * 3513347 2012-03-31 blaschke-oss TCK: CIMObjectPath allows empty string */ package javax.cim; |
From: Dave B. <bla...@us...> - 2012-04-16 12:53:01
|
Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv27712/src/javax/cim Modified Files: CIMObjectPath.java Log Message: 3513343 - TCK: CIMObjectPath must validate XML schema name Index: CIMObjectPath.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMObjectPath.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- CIMObjectPath.java 13 Apr 2012 12:19:15 -0000 1.28 +++ CIMObjectPath.java 16 Apr 2012 12:52:59 -0000 1.29 @@ -28,11 +28,14 @@ * 3023141 2010-07-01 blaschke-oss CIMObjectPath uses # constructor instead of valueOf * 3496349 2012-03-02 blaschke-oss JSR48 1.0.0: add CIMObjectPath getKeyValue * 3510090 2012-03-23 blaschke-oss Fix CIMObjectPath.toString() inconsistencies + * 3513343 2012-03-31 blaschke-oss TCK: CIMObjectPath must validate XML schema name */ package javax.cim; import java.io.Serializable; +import java.net.MalformedURLException; +import java.net.URL; import java.util.Arrays; import org.sblim.cimclient.internal.cim.CIMElementSorter; @@ -447,6 +450,13 @@ public CIMObjectPath(String pScheme, String pHost, String pPort, String pNamespace, String pObjectName, CIMProperty<?>[] pKeys, String pXmlSchemaName) { this(pScheme, pHost, pPort, pNamespace, pObjectName, pKeys); + if (pXmlSchemaName != null) { + try { + new URL(pXmlSchemaName); + } catch (MalformedURLException e) { + throw new IllegalArgumentException(e); + } + } this.iXmlSchemaName = pXmlSchemaName; } |
From: Dave B. <bla...@us...> - 2012-04-16 12:44:41
|
Update of /cvsroot/sblim/jsr48-client/src/javax/cim In directory vz-cvs-3.sog:/tmp/cvs-serv26248/src/javax/cim Modified Files: CIMDataType.java Log Message: 3513349 - TCK: CIMDataType must not accept null string Index: CIMDataType.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/cim/CIMDataType.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- CIMDataType.java 13 Apr 2012 13:58:28 -0000 1.15 +++ CIMDataType.java 16 Apr 2012 12:44:39 -0000 1.16 @@ -22,6 +22,7 @@ * 2935258 2010-01-22 blaschke-oss Sync up javax.cim.* javadoc with JSR48 1.0.0 * 3004779 2010-06-16 blaschke-oss TCK: CIMDataType not throwing IllegalArgumentException * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 + * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string */ package javax.cim; @@ -548,6 +549,7 @@ * The CIM class reference name. */ public CIMDataType(String pClassName) { + if (pClassName == null) throw new IllegalArgumentException("Class name must not be null!"); setType(REFERENCE); this.iRefClassName = pClassName; } @@ -562,6 +564,7 @@ * The size of the array. 0 indicates the array is unbounded. */ public CIMDataType(String pClassName, int pSize) { + if (pClassName == null) throw new IllegalArgumentException("Class name must not be null!"); if (pSize < 0) throw new IllegalArgumentException( "Maximum number of elements cannot be negative integer!"); setType(REFERENCE, pSize); |
From: Dave B. <bla...@us...> - 2012-04-16 12:44:40
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml In directory vz-cvs-3.sog:/tmp/cvs-serv26248/src/org/sblim/cimclient/internal/cimxml Modified Files: CIMXMLParserImpl.java Log Message: 3513349 - TCK: CIMDataType must not accept null string Index: CIMXMLParserImpl.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/cimxml/CIMXMLParserImpl.java,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- CIMXMLParserImpl.java 13 Apr 2012 13:47:35 -0000 1.44 +++ CIMXMLParserImpl.java 16 Apr 2012 12:44:38 -0000 1.45 @@ -51,6 +51,7 @@ * 3297028 2011-05-03 blaschke-oss Instances contain CIMClassProperty with DOM parser * 3411944 2011-09-20 blaschke-oss createJavaObject exception with hex uint * 3513353 2012-03-30 blaschke-oss TCK: CIMDataType arrays must have length >= 1 + * 3513349 2012-03-31 blaschke-oss TCK: CIMDataType must not accept null string */ package org.sblim.cimclient.internal.cimxml; @@ -807,7 +808,7 @@ // FIXME: ebak: What is the string representation of OBJECT? TYPESTR_MAP.put("object", CIMDataType.OBJECT_T); TYPESTR_MAP.put(MOF.CLASS, CIMDataType.CLASS_T); - TYPESTR_MAP.put(MOF.REFERENCE, new CIMDataType(null)); + TYPESTR_MAP.put(MOF.REFERENCE, new CIMDataType("")); } /** |
From: Michael Chase-S. <mc...@us...> - 2012-04-13 23:48:23
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv11517 Modified Files: ChangeLog NEWS interopProvider.c Log Message: [ 3517573 ] Problem with SequenceContext migration Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.682 retrieving revision 1.683 diff -u -d -r1.682 -r1.683 --- NEWS 13 Apr 2012 17:53:38 -0000 1.682 +++ NEWS 13 Apr 2012 23:48:19 -0000 1.683 @@ -12,6 +12,7 @@ - 3514443 sfcb 1.3.14 compilation error - 3514627 unsupported sfcb.cfg param - use exit call - 3516184 commClose close socket when file hndl is null +- 3517573 Problem with SequenceContext migration Changes in 1.3.14 ================= Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- interopProvider.c 29 Mar 2012 15:39:33 -0000 1.58 +++ interopProvider.c 13 Apr 2012 23:48:19 -0000 1.59 @@ -710,19 +710,15 @@ CMPIData isinst=CMGetNext(isenm,NULL); CMPIData mc=CMGetProperty(isinst.value.inst,"DeliveryRetryAttempts",NULL); int RIEnabled=mc.value.uint16; + mc = CMGetProperty(isinst.value.inst, "Name", NULL); _SFCB_TRACE(1,("--- checking for cim_listenerdestination")); op=CMNewObjectPath(broker,"root/interop","cim_listenerdestination",&st); enm = _broker->bft->enumerateInstances(_broker, ctx, op, NULL, &st); if(enm) { - // Get the IndicationService name for SequenceContext migration - CMPIObjectPath * isop = CMNewObjectPath(_broker, "root/interop", "CIM_IndicationService", NULL); - CMPIEnumeration * isenm = _broker->bft->enumerateInstances(_broker, ctx, isop, NULL, NULL); - CMPIData isinst = CMGetNext(isenm, NULL); - CMPIData mc = CMGetProperty(isinst.value.inst, "Name", NULL); - CMPIData ld; // Loop through all the listeners + CMPIData ld; int ldcount=0; char context[100]; while(enm->ft->hasNext(enm, &st) && (ci=(enm->ft->getNext(enm, &st)).value.inst)) { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.761 retrieving revision 1.762 diff -u -d -r1.761 -r1.762 --- ChangeLog 13 Apr 2012 17:53:38 -0000 1.761 +++ ChangeLog 13 Apr 2012 23:48:19 -0000 1.762 @@ -1,3 +1,8 @@ +2012-04-13 Michael Chase-Salerno <br...@li...> + + * interopProvider.c: + [ 3517573 ] Problem with SequenceContext migration + 2012-04-13 Narasimhma Sharoff <nsh...@us...> * brokerOs.c, brokerUpc.c, native.h: @@ -23,8 +28,8 @@ 2012-04-05 Narasimha Sharoff <nsh...@us...> - * control.c: - [ 3514627 ] unsupported sfcb.cfg param - use exit call + * control.c: + [ 3514627 ] unsupported sfcb.cfg param - use exit call 2012-04-03 Chris Buccella <buc...@li...> |
From: Chris B. <buc...@us...> - 2012-04-13 21:18:38
|
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 3f1adc4d18eff30f4829ef38e3f654c14c532185 (commit) via e0480e068ebf4c87781973a8bd52c7087422f353 (commit) from c3e8b885ff74c3f29537aa32c38b0024fa02e2e8 (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 3f1adc4d18eff30f4829ef38e3f654c14c532185 Author: buccella <buc...@li...> Date: Fri Apr 13 17:18:36 2012 -0400 [ 3501314 ] Add dynamic logging and syslog output to sfcb trace commit e0480e068ebf4c87781973a8bd52c7087422f353 Author: buccella <buc...@li...> Date: Fri Apr 13 17:18:09 2012 -0400 [ 3501314 ] Add dynamic logging and syslog output to sfcb trace ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 70041b4..6b84f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-04-13 Chris Buccella <buc...@li...> + + * Makefile.am, cimRequest.c, httpAdapter.c, httpComm.c, providerDrv.c, + providerMgr.c, sfcBroker.c, sfcb.cfg.pre.in, trace.c, trace.h: + [ 3501314 ] Add dynamic logging and syslog output to sfcb trace + (based on patch by Mike Lisanke) + 2012-04-13 Michael Chase-Salerno <br...@li...> * interopProvider.c: diff --git a/Makefile.am b/Makefile.am index 43ecd4a..f4dd810 100644 --- a/Makefile.am +++ b/Makefile.am @@ -167,7 +167,7 @@ sbin_PROGRAMS = \ sfcbd bin_PROGRAMS = \ - sfcbmofpp sfcbdump sfcbinst2mof + sfcbmofpp sfcbdump sfcbinst2mof sfcbtrace noinst_PROGRAMS = \ sfcbdumpP32onI32 classSchema2c sfcbsem @@ -410,6 +410,9 @@ sfcbdump_SOURCES=sfcbdump.c sfcbinst2mof_SOURCES=sfcbinst2mof.c sfcbinst2mof_LDADD = -lsfcFileRepository +sfcbtrace_SOURCES=sfcbtrace.c +sfcbtrace_LDADD = -lsfcBrokerCore + classSchema2c_SOURCES=classSchema2c.c classSchema2c_LDADD=-lsfcBrokerCore classSchema2c_DEPENDENCIES=libsfcBrokerCore.la diff --git a/NEWS b/NEWS index cf08bf1..3c35c75 100644 --- a/NEWS +++ b/NEWS @@ -91,6 +91,9 @@ Everything in 1.3.10, plus: Changes in 1.3.15 ================= +New Features: +- 3501314 Add dynamic logging and syslog output to sfcb trace + Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call - 3516184 commClose close socket when file hndl is null diff --git a/cimRequest.c b/cimRequest.c index 44da6f5..58a0ac6 100644 --- a/cimRequest.c +++ b/cimRequest.c @@ -527,7 +527,7 @@ genResponses(BinRequestContext * binCtx, struct timeval sv, ev; - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv, NULL); getrusage(RUSAGE_SELF, &us); } @@ -542,7 +542,7 @@ genResponses(BinRequestContext * binCtx, if (binCtx->pDone < binCtx->pCount) rs.segments[6].txt = NULL; #ifdef SFCB_DEBUG - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&ev, NULL); getrusage(RUSAGE_SELF, &ue); _sfcb_trace(1, __FILE__, __LINE__, @@ -1788,7 +1788,7 @@ handleCimRequest(CimRequestContext * ctx, int flags) 0 = format understood 1 = format not understood */ - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv, NULL); getrusage(RUSAGE_SELF, &us); } @@ -1822,7 +1822,7 @@ handleCimRequest(CimRequestContext * ctx, int flags) hdr.binCtx->rHdr = &hdr; #ifdef SFCB_DEBUG - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&ev, NULL); getrusage(RUSAGE_SELF, &ue); _sfcb_trace(1, __FILE__, __LINE__, diff --git a/httpAdapter.c b/httpAdapter.c index 188502d..0ea9b4a 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -1186,13 +1186,13 @@ doHttpRequest(CommHndl conn_fd) ctx.sessionId = sessionId; #ifdef SFCB_DEBUG - if ((_sfcb_trace_mask & TRACE_RESPONSETIMING)) { + if ((*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING)) { gettimeofday(&sv, NULL); getrusage(RUSAGE_SELF, &us); uset = 1; } - if ((_sfcb_trace_mask & TRACE_XMLIN)) { + if ((*_ptr_sfcb_trace_mask & TRACE_XMLIN)) { _sfcb_trace(1, __FILE__, __LINE__, _sfcb_format_trace("-#- xmlIn %d bytes:\n%*s", inBuf.content_length, @@ -1224,7 +1224,7 @@ doHttpRequest(CommHndl conn_fd) releaseAuthHandle(); #ifdef SFCB_DEBUG - if (uset && (_sfcb_trace_mask & TRACE_RESPONSETIMING)) { + if (uset && (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING)) { gettimeofday(&ev, NULL); getrusage(RUSAGE_SELF, &ue); _sfcb_trace(1, __FILE__, __LINE__, diff --git a/httpComm.c b/httpComm.c index 64b060e..11dc0cf 100644 --- a/httpComm.c +++ b/httpComm.c @@ -64,7 +64,7 @@ commWrite(CommHndl to, void *data, size_t count) _SFCB_ENTER(TRACE_HTTPDAEMON | TRACE_XMLOUT, "commWrite"); #ifdef SFCB_DEBUG - if ((_sfcb_trace_mask & TRACE_XMLOUT)) { + if ((*_ptr_sfcb_trace_mask & TRACE_XMLOUT)) { char *mp, *m = alloca(count * 2), *d = (char *) data; diff --git a/providerDrv.c b/providerDrv.c index 4a8d4b0..3cc6400 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -63,7 +63,7 @@ char *opsName[]; struct timeval sv,ev; #define TIMING_START(req,pInfo) \ - if (pInfo && req && (_sfcb_trace_mask & TRACE_RESPONSETIMING) ) {\ + if (pInfo && req && (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) ) {\ gettimeofday(&sv,NULL);\ getrusage(RUSAGE_SELF,&us);\ getrusage(RUSAGE_CHILDREN,&cs);\ diff --git a/providerMgr.c b/providerMgr.c index 1270a0b..6af92a7 100644 --- a/providerMgr.c +++ b/providerMgr.c @@ -1267,7 +1267,7 @@ intInvokeProvider(BinRequestContext * ctx, ComSockets sockets) struct timeval sv, ev; - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv, NULL); getrusage(RUSAGE_SELF, &us); } @@ -1431,7 +1431,7 @@ intInvokeProvider(BinRequestContext * ctx, ComSockets sockets) releaseHeap(heapCtl); #ifdef SFCB_DEBUG - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&ev, NULL); getrusage(RUSAGE_SELF, &ue); _sfcb_trace(1, __FILE__, __LINE__, diff --git a/sfcBroker.c b/sfcBroker.c index d45c1eb..e4789e7 100644 --- a/sfcBroker.c +++ b/sfcBroker.c @@ -253,6 +253,8 @@ stopBroker(void *p) pthread_mutex_unlock(&syncMtx); + _SFCB_TRACE_STOP(); + if (restartBroker) { char *emsg = strerror(errno); execvp("sfcbd", restartArgv); @@ -750,22 +752,21 @@ main(int argc, char *argv[]) getControlNum("traceMask", &tmask); } - if (tmask) { - if (getControlNum("traceLevel", &tracelevel) || tracelevel == 0) { - /* - * no tracelevel found in config file, use default - */ - tracelevel = 1; - } - if (getenv("SFCB_TRACE_FILE") == NULL && - getControlChars("traceFile", &tracefile) == 0) { - /* - * only set tracefile from config file if not specified via env - */ - _SFCB_TRACE_SETFILE(tracefile); - } - _SFCB_TRACE_START(tracelevel, tmask); + if (getControlNum("traceLevel", &tracelevel) || tracelevel == 0) { + /* + * no tracelevel found in config file, use default + */ + tracelevel = 1; + } + if (getenv("SFCB_TRACE_FILE") == NULL && + getControlChars("traceFile", &tracefile) == 0) { + /* + * only set tracefile from config file if not specified via env + */ + _SFCB_TRACE_SETFILE(tracefile); } + _SFCB_TRACE_START(tracelevel, tmask); + // SFCB_DEBUG #ifndef SFCB_DEBUG if (tmask) diff --git a/sfcb.cfg.pre.in b/sfcb.cfg.pre.in index bd587df..6d116a9 100644 --- a/sfcb.cfg.pre.in +++ b/sfcb.cfg.pre.in @@ -265,6 +265,7 @@ sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH ## Location of the trace file. ## Can be overriden by setting environment variable SFCB_TRACE_FILE +## The special value "syslog" will send trace to the syslog ## Default is stderr #traceFile: stderr diff --git a/sfcbtrace.c b/sfcbtrace.c new file mode 100644 index 0000000..83e28d9 --- /dev/null +++ b/sfcbtrace.c @@ -0,0 +1,98 @@ + +/* + * + * (C) Copyright IBM Corp. 2012 + * + * 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: Mike Lisanke <mli...@us...> + * Chris Buccella <buc...@li...> + * + * Description: + * + * Sets the component trace mask for SFCB trace output + * +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <stdlib.h> +#include <errno.h> +#include <string.h> +#include <ctype.h> +#include "trace.h" + +int shmkey = 0xdeb001; +extern TraceId traceIds[]; + +void print_help() { + printf( "sfcbtrace - toggle the tracemask for SFCB trace output\n\n"); + printf( "Usage: sfcbtrace <trace_mask> <shm_key>\n"); + printf( "\ttrace_mask - an unsigned long or hex value for component(s) to trace (default=0) \n"); + printf( "\tshm_key - the shared memory ID being used by SFCB (default=%x)\n\n", shmkey); + + printf("Traceable Components: Int Hex\n"); + int i; + for (i = 0; traceIds[i].id; i++) + printf(" %18s: %d\t0x%05X\n", traceIds[i].id, traceIds[i].code, traceIds[i].code); + + return; +} + +int main(int argc, char **argv) { + + int shmid; + unsigned long tmask = 0; + void *vpDP = NULL; + unsigned long *pulDP = NULL; + + if (argc > 3) { + print_help(); + exit(1); + } + + if (argc == 1) { + print_help(); + exit(0); + } + else + tmask = strtoul( argv[1], NULL, 16 ); + + if (argc == 3) { + shmkey = strtoul( argv[2], NULL, 16 ); + } + + if (errno) fprintf(stderr, "errno set\n"); + + if ((shmid = shmget( shmkey, sizeof(unsigned long), 0660 )) < 0) { + if (errno == ENOENT) + printf("No segment for key %x (sfcbd not running?)\n", shmkey); + else if (errno == EACCES) + printf("Permission denied; can't set segment\n"); + else { + printf( "shmget(%x,...) failed in %s at line %d\n", shmkey, __FILE__, __LINE__ ); + print_help(); + } + exit(3); + } + + vpDP = shmat( shmid, NULL, 0 ); + if ( (vpDP == (void*)-1) || (vpDP == NULL) ) { /* shmat returns an error */ + printf( "shmat(%x,) returned %08X with errno = %s(%u) in %s at line %d\n", shmid, (unsigned int)vpDP, strerror(errno), errno, __FILE__, __LINE__ ); + exit(4); + } + + pulDP = (unsigned long *)vpDP; + + *pulDP = tmask; + printf( "debug key %x was set to value %lx\n", shmkey, *pulDP ); + + exit(0); +} diff --git a/trace.c b/trace.c index 55aaae6..145679b 100644 --- a/trace.c +++ b/trace.c @@ -33,6 +33,9 @@ #include <sys/types.h> #include <unistd.h> #include <pthread.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <stdlib.h> #include "config.h" /* @@ -52,7 +55,12 @@ int terminating = 0; int _sfcb_debug = 0; unsigned long _sfcb_trace_mask = 0; +/* use pointer indirect _sfcb_trace_mask to allow shared memory flag */ +unsigned long *_ptr_sfcb_trace_mask = &_sfcb_trace_mask; +void *vpDP = NULL; +int shmid; char *_SFCB_TRACE_FILE = NULL; +int _SFCB_TRACE_TO_SYSLOG = 0; TraceId traceIds[] = { {"providerMgr", TRACE_PROVIDERMGR}, @@ -109,6 +117,7 @@ _sfcb_trace_start(int n) void _sfcb_trace_stop() { + shmctl(shmid, IPC_RMID, 0); _sfcb_debug = 0; } @@ -119,6 +128,25 @@ _sfcb_trace_init() char *var = NULL; char *err = NULL; FILE *ferr = NULL; + int tryid = 0xDEB001; + + while ((shmid = shmget(tryid, sizeof(unsigned long), (IPC_CREAT | 0660))) < 0 && (errno == EEXIST)) tryid++; + mlogf(M_INFO,M_SHOW,"--- Shared memory ID for tracing: %x\n", tryid); + if (shmid < 0) { + mlogf(M_ERROR,M_SHOW, "shmget(%x) failed in %s at line %d.\n", tryid, __FILE__, __LINE__ ); + abort(); + } + else { + vpDP = shmat( shmid, NULL, 0 ); + + if (vpDP == (void*)-1) {// shmat returns an error + mlogf(M_ERROR,M_SHOW, "shmat(%u,) failed with errno = %s(%u) in %s at line %d.\n", shmid, strerror(errno), errno, __FILE__, __LINE__ ); + abort(); + } + else { + _ptr_sfcb_trace_mask = (unsigned long *)vpDP; + } + } var = getenv("SFCB_TRACE"); if (var != NULL) { @@ -183,14 +211,23 @@ _sfcb_trace(int level, char *file, int line, char *msg) strftime(tm, 20, "%m/%d/%Y %H:%M:%S", &cttm); } - if (colorTrace) { - changeTextColor(0); - fprintf(ferr, "[%i] [%s] %d/%p --- %s(%i) : %s\n", level, tm, - currentProc, (void *) pthread_self(), file, line, msg); - changeTextColor(1); - } else { - fprintf(ferr, "[%i] [%s] %d/%p --- %s(%i) : %s\n", level, tm, - currentProc, (void *) pthread_self(), file, line, msg); + if (*_ptr_sfcb_trace_mask) { + if (_SFCB_TRACE_TO_SYSLOG) { + /* ERROR is the default syslog level, if a user does not specify INFO or DEBUG. + ERROR guarantees output will end up in syslog */ + mlogf(M_ERROR,M_SHOW,"[%i] [%s] %d/%p --- %s(%i) : %s\n", level, tm, currentProc, (void *)pthread_self(), file, + line, msg); + } + else if (colorTrace) { + changeTextColor(0); + fprintf(ferr, "[%i] [%s] %d/%p --- %s(%i) : %s\n", level, tm, currentProc, (void *)pthread_self(), file, + line, msg); + changeTextColor(1); + } + else { + fprintf(ferr, "[%i] [%s] %d/%p --- %s(%i) : %s\n", level, tm, currentProc, (void *)pthread_self(), file, + line, msg); + } } free(tm); @@ -201,13 +238,13 @@ _sfcb_trace(int level, char *file, int line, char *msg) if ((_SFCB_TRACE_FILE != NULL)) { fclose(ferr); } - + } -extern void -_sfcb_set_trace_mask(int n) +extern void _sfcb_set_trace_mask(unsigned long n) { - _sfcb_trace_mask = n; + unsigned long *pulDP = (unsigned long*)vpDP; + *pulDP = n; } extern void @@ -216,7 +253,11 @@ _sfcb_set_trace_file(char *file) if (_SFCB_TRACE_FILE) { free(_SFCB_TRACE_FILE); } - if (strcmp(file, "stderr") == 0) { + if (strcmp(file, "syslog") == 0) { + _SFCB_TRACE_FILE = NULL; + _SFCB_TRACE_TO_SYSLOG = 1; + } + else if (strcmp(file,"stderr") == 0) { _SFCB_TRACE_FILE = NULL; } else { _SFCB_TRACE_FILE = strdup(file); diff --git a/trace.h b/trace.h index dc1021a..238a863 100644 --- a/trace.h +++ b/trace.h @@ -25,10 +25,14 @@ #include "mlog.h" +extern unsigned long _sfcb_trace_mask; +/* use pointer indirect _sfcb_trace_mask to allow shared memory flag */ +extern unsigned long *_ptr_sfcb_trace_mask; + #ifdef SFCB_DEBUG #define _SFCB_TRACE(LEVEL,STR) \ - if ((_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) \ + if ((*_ptr_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) \ _sfcb_trace(LEVEL,__FILE__,__LINE__,_sfcb_format_trace STR); #define _SFCB_ENTER(n,f) \ @@ -59,7 +63,7 @@ #define _SFCB_TRACE_FUNCTION(LEVEL,f) \ _SFCB_TRACE(LEVEL,("Invoking trace function %s",#f)); \ - if ((_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) { \ + if ((*_ptr_sfcb_trace_mask & __traceMask) && (LEVEL<=_sfcb_debug) && (LEVEL>0) ) { \ f;} #define _SFCB_ABORT() {\ @@ -70,14 +74,13 @@ _sfcb_trap(n); extern int _sfcb_debug; -extern unsigned long _sfcb_trace_mask; extern char *_sfcb_format_trace(char *fmt, ...); extern void _sfcb_trace(int, char *, int, char *); extern void _sfcb_trace_start(int l); extern void _sfcb_trace_init(); extern void _sfcb_trace_stop(); -extern void _sfcb_set_trace_mask(int n); +extern void _sfcb_set_trace_mask(unsigned long n); extern void _sfcb_set_trace_file(char *file); extern void _sfcb_trap(int n); @@ -98,8 +101,6 @@ extern void _sfcb_trap(int n); #define TRAP(n) #endif -extern void _sfcb_set_trace_mask(int n); - typedef struct traceId { char *id; int code; hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2012-04-13 20:51: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 c3e8b885ff74c3f29537aa32c38b0024fa02e2e8 (commit) from 208c2c055317d633843041e023904a5de383f9be (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 c3e8b885ff74c3f29537aa32c38b0024fa02e2e8 Author: Michael Chase-Salerno <br...@li...> Date: Fri Apr 13 16:51:01 2012 -0400 [ 3517573 ] Problem with SequenceContext migration ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ec61cb2..70041b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-13 Michael Chase-Salerno <br...@li...> + + * interopProvider.c: + [ 3517573 ] Problem with SequenceContext migration + 2012-04-13 Narasimha Sharoff <nsh...@us...> * httpAdapter.c, httpComm.c: diff --git a/NEWS b/NEWS index a544450..cf08bf1 100644 --- a/NEWS +++ b/NEWS @@ -94,6 +94,7 @@ Changes in 1.3.15 Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call - 3516184 commClose close socket when file hndl is null +- 3517573 Problem with SequenceContext migration Changes in 1.3.14 diff --git a/interopProvider.c b/interopProvider.c index 0639f9b..192b062 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -788,6 +788,7 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx) CMPIData isinst=CMGetNext(isenm,NULL); CMPIData mc=CMGetProperty(isinst.value.inst,"DeliveryRetryAttempts",NULL); int RIEnabled=mc.value.uint16; + mc = CMGetProperty(isinst.value.inst, "Name", NULL); _SFCB_TRACE(1, ("--- checking for cim_listenerdestination")); op = CMNewObjectPath(broker, "root/interop", "cim_listenerdestination", @@ -795,13 +796,8 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx) enm = _broker->bft->enumerateInstances(_broker, ctx, op, NULL, &st); if (enm) { - // Get the IndicationService name for SequenceContext migration - CMPIObjectPath * isop = CMNewObjectPath(_broker, "root/interop", "CIM_IndicationService", NULL); - CMPIEnumeration * isenm = _broker->bft->enumerateInstances(_broker, ctx, isop, NULL, NULL); - CMPIData isinst = CMGetNext(isenm, NULL); - CMPIData mc = CMGetProperty(isinst.value.inst, "Name", NULL); - CMPIData ld; // Loop through all the listeners + CMPIData ld; int ldcount=0; char context[100]; while (enm->ft->hasNext(enm, &st) hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-04-13 18:05:44
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv6081 Modified Files: cimXmlRequest.c Log Message: [ 3501314 ] Add dynamic logging and syslog output to sfcb trace Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- cimXmlRequest.c 10 Apr 2012 15:49:56 -0000 1.71 +++ cimXmlRequest.c 13 Apr 2012 18:05:40 -0000 1.72 @@ -549,7 +549,7 @@ struct rusage us,ue; struct timeval sv, ev; - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv,NULL); getrusage(RUSAGE_SELF,&us); } @@ -563,7 +563,7 @@ rs=iMethodResponse(binCtx->rHdr, sb); if (binCtx->pDone<binCtx->pCount) rs.segments[6].txt=NULL; #ifdef SFCB_DEBUG - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&ev,NULL); getrusage(RUSAGE_SELF,&ue); _sfcb_trace(1,__FILE__,__LINE__, @@ -2730,7 +2730,7 @@ struct rusage us,ue; struct timeval sv, ev; - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&sv,NULL); getrusage(RUSAGE_SELF,&us); } @@ -2740,7 +2740,7 @@ hdr.role=ctx->role; #ifdef SFCB_DEBUG - if (_sfcb_trace_mask & TRACE_RESPONSETIMING) { + if (*_ptr_sfcb_trace_mask & TRACE_RESPONSETIMING) { gettimeofday(&ev,NULL); getrusage(RUSAGE_SELF,&ue); _sfcb_trace(1,__FILE__,__LINE__, |
From: Narasimha S. <nsh...@us...> - 2012-04-13 17:53:40
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5215 Modified Files: NEWS ChangeLog Log Message: [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.681 retrieving revision 1.682 diff -u -d -r1.681 -r1.682 --- NEWS 13 Apr 2012 16:17:31 -0000 1.681 +++ NEWS 13 Apr 2012 17:53:38 -0000 1.682 @@ -5,6 +5,7 @@ - 3440300 Allow forced chunked responses - 3501314 Add dynamic logging and syslog output to sfcb trace +- 3517530 Implement mark, release routines in CMPIBrokerMemFT Bugs fixed: Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.760 retrieving revision 1.761 diff -u -d -r1.760 -r1.761 --- ChangeLog 13 Apr 2012 16:18:07 -0000 1.760 +++ ChangeLog 13 Apr 2012 17:53:38 -0000 1.761 @@ -1,5 +1,10 @@ 2012-04-13 Narasimhma Sharoff <nsh...@us...> + * brokerOs.c, brokerUpc.c, native.h: + [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT + +2012-04-13 Narasimhma Sharoff <nsh...@us...> + * httpAdapter.c, httpComm.c: [ 3516184 ] commClose close socket when file hndl is null |
From: Narasimha S. <nsh...@us...> - 2012-04-13 17:53:07
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5147 Modified Files: brokerOs.c brokerUpc.c native.h Log Message: [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- brokerUpc.c 15 Mar 2012 20:54:03 -0000 1.39 +++ brokerUpc.c 13 Apr 2012 17:53:04 -0000 1.40 @@ -122,8 +122,7 @@ while (se) { - void *hc = markHeap(); /* 3497209:78376 */ - + CMPIGcStat *hc = (void *)(mb->mft->mark(mb, &st)); /* Check for matching FROM class */ for (x=0; x<se->qs->fcNext; x++) { if (CMClassPathIsA(mb, indop, se->qs->fClasses[x], &st)) { @@ -131,8 +130,7 @@ break; } } - - releaseHeap(hc); /* 3497209:78376 - relase objs that are no longer reqd */ + mb->mft->release(mb, hc); if (classMatch && se->exp.ft->evaluate(&se->exp,ind,&st)) { /*apply a propertyfilter in case the query is not "SELECT * FROM ..." */ @@ -1205,13 +1203,14 @@ CMPIBrokerFT *RequestFT = &request_FT; extern CMPIBrokerExtFT brokerExt_FT; +extern CMPIBrokerMemFT brokerMem_FT; static CMPIBroker _broker = { NULL, &request_FT, &native_brokerEncFT, &brokerExt_FT, - NULL + &brokerMem_FT }; CMPIBroker *Broker = &_broker; Index: brokerOs.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerOs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- brokerOs.c 20 May 2008 14:50:22 -0000 1.4 +++ brokerOs.c 13 Apr 2012 17:53:04 -0000 1.5 @@ -242,3 +242,49 @@ }; CMPIBrokerExtFT *CMPI_BrokerExt_Ftab = &brokerExt_FT; + + +/* + * ----------------------------------------------- + * CMPIBrokerMemFT -memory specific CIMOM routines + * ------------------------------------------------ +*/ +extern void *markHeap(); +extern void releaseHeap(void *); + +/* The following two are wrappers for markHeap() and releaseHeap() + * in support.c which allows for provider calls via broker->mft functions +*/ +static CMPIGcStat *mark(const CMPIBroker *mb, CMPIStatus *rc) +{ + return((CMPIGcStat *)markHeap()); +} + +static CMPIStatus release(const CMPIBroker *mb, const CMPIGcStat *gc) +{ + CMPIStatus st = {CMPI_RC_OK, NULL}; + releaseHeap((void *)gc); + return(st); +} + + +CMPIBrokerMemFT brokerMem_FT = { + CMPICurrentVersion, + mark, + release, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +CMPIBrokerMemFT *CMPI_BrokerMem_Ftab = &brokerMem_FT; + Index: native.h =================================================================== RCS file: /cvsroot/sblim/sfcb/native.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- native.h 2 Oct 2007 09:02:11 -0000 1.10 +++ native.h 13 Apr 2012 17:53:04 -0000 1.11 @@ -105,6 +105,7 @@ CMPIContext *native_clone_CMPIContext(const CMPIContext *ctx); extern CMPIBrokerExtFT *CMPI_BrokerExt_Ftab; +extern CMPIBrokerMemFT *CMPI_BrokerMem_Ftab; MsgSegment setObjectPathMsgSegment(const CMPIObjectPath * op); CMPIInstance *relocateSerializedInstance(void *area); |
From: Narasimha S. <nsh...@us...> - 2012-04-13 16:49:05
|
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 208c2c055317d633843041e023904a5de383f9be (commit) from e75d7ec2dc8927f5bbf937d1e543f220c401ef09 (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 208c2c055317d633843041e023904a5de383f9be Author: Narasimha Sharoff <nsh...@us...> Date: Fri Apr 13 09:47:33 2012 -0700 [ 3516184 ] commClose close socket when file hndl is null Signed-off-by: Narasimha Sharoff <nsh...@us...> ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index a16b4d7..ec61cb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-13 Narasimha Sharoff <nsh...@us...> + + * httpAdapter.c, httpComm.c: + [ 3516184 ] commClose close socket when file hndl is null + 2012-04-10 Michael Chase-Salerno <br...@li...> * ABTScript: diff --git a/NEWS b/NEWS index 2bb04e4..a544450 100644 --- a/NEWS +++ b/NEWS @@ -93,6 +93,7 @@ Changes in 1.3.15 Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call +- 3516184 commClose close socket when file hndl is null Changes in 1.3.14 diff --git a/httpAdapter.c b/httpAdapter.c index d0ca581..188502d 100644 --- a/httpAdapter.c +++ b/httpAdapter.c @@ -655,6 +655,7 @@ writeChunkResponse(BinRequestContext * ctx, BinResponseHdr * rh) RespSegments rs; rs = genFirstChunkErrorResponse(ctx, rh->rc - 1, NULL); writeResponse(*ctx->commHndl, rs); + commFlush(*(ctx->commHndl)); _SFCB_EXIT(); } writeChunkHeaders(ctx); @@ -1300,6 +1301,7 @@ handleHttpRequest(int connFd, int sslMode) if (r < 0) { char *emsg = strerror(errno); mlogf(M_ERROR, M_SHOW, "--- fork handler: %s\n", emsg); + close(connFd); exit(1); } diff --git a/httpComm.c b/httpComm.c index 3bdb568..64b060e 100644 --- a/httpComm.c +++ b/httpComm.c @@ -152,6 +152,7 @@ commClose(CommHndl hndl) { _SFCB_ENTER(TRACE_HTTPDAEMON, "commClose"); + if (hndl.socket == -1) return; /* socket was closed already */ #if defined USE_SSL if (hndl.ssl) { if ((SSL_get_shutdown(hndl.ssl) & SSL_RECEIVED_SHUTDOWN)) @@ -159,16 +160,16 @@ commClose(CommHndl hndl) else SSL_clear(hndl.ssl); SSL_free(hndl.ssl); - } else + } #endif - if (hndl.file == NULL) { - close(hndl.socket); - } else { + if (hndl.file != NULL) { fclose(hndl.file); if (hndl.buf) { free(hndl.buf); } } + close(hndl.socket); + hndl.socket = -1; _SFCB_EXIT(); } /* MODELINES */ hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-04-13 16:18:09
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv30652 Modified Files: ChangeLog Log Message: [ 3516184 ] commClose close socket when file hndl is null Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.759 retrieving revision 1.760 diff -u -d -r1.759 -r1.760 --- ChangeLog 11 Apr 2012 22:55:17 -0000 1.759 +++ ChangeLog 13 Apr 2012 16:18:07 -0000 1.760 @@ -1,3 +1,8 @@ +2012-04-13 Narasimhma Sharoff <nsh...@us...> + + * httpAdapter.c, httpComm.c: + [ 3516184 ] commClose close socket when file hndl is null + 2012-04-11 Chris Buccella <buc...@li...> * Makefile.am, cimXmlRequest.c, httpAdapter.c, httpComm.c, |
From: Narasimha S. <nsh...@us...> - 2012-04-13 16:17:33
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv30641 Modified Files: NEWS Log Message: [ 3516184 ] commClose close socket when file hndl is null Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.680 retrieving revision 1.681 diff -u -d -r1.680 -r1.681 --- NEWS 11 Apr 2012 22:55:17 -0000 1.680 +++ NEWS 13 Apr 2012 16:17:31 -0000 1.681 @@ -10,6 +10,7 @@ - 3514443 sfcb 1.3.14 compilation error - 3514627 unsupported sfcb.cfg param - use exit call +- 3516184 commClose close socket when file hndl is null Changes in 1.3.14 ================= |
From: Narasimha S. <nsh...@us...> - 2012-04-13 16:17:06
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv30626 Modified Files: httpComm.c Log Message: [ 3516184 ] commClose close socket when file hndl is null Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: httpComm.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpComm.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- httpComm.c 11 Apr 2012 22:55:17 -0000 1.13 +++ httpComm.c 13 Apr 2012 16:17:04 -0000 1.14 @@ -135,21 +135,22 @@ { _SFCB_ENTER(TRACE_HTTPDAEMON, "commClose"); + if (hndl.socket == -1) return; /* socket was closed already */ #if defined USE_SSL if (hndl.ssl) { if ((SSL_get_shutdown(hndl.ssl) & SSL_RECEIVED_SHUTDOWN)) SSL_shutdown(hndl.ssl); else SSL_clear(hndl.ssl); SSL_free(hndl.ssl); - } else + } #endif - if (hndl.file == NULL) { - close(hndl.socket); - } else { + if (hndl.file != NULL) { fclose(hndl.file); if (hndl.buf) { free(hndl.buf); } } + close(hndl.socket); + hndl.socket = -1; _SFCB_EXIT(); } |
From: Narasimha S. <nsh...@us...> - 2012-04-13 16:16:23
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv30490 Modified Files: httpAdapter.c Log Message: [ 3516184 ] commClose close socket when file hndl is null Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.106 retrieving revision 1.107 diff -u -d -r1.106 -r1.107 --- httpAdapter.c 11 Apr 2012 22:55:17 -0000 1.106 +++ httpAdapter.c 13 Apr 2012 16:16:20 -0000 1.107 @@ -586,6 +586,7 @@ RespSegments rs; rs=genFirstChunkErrorResponse(ctx, rh->rc-1, NULL); writeResponse(*ctx->commHndl, rs); + commFlush(*(ctx->commHndl)); _SFCB_EXIT(); } writeChunkHeaders(ctx); @@ -1171,6 +1172,7 @@ if (r < 0) { char *emsg=strerror(errno); mlogf(M_ERROR,M_SHOW,"--- fork handler: %s\n",emsg); + close(connFd); exit(1); } |