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-07-10 16:29:07
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv32452 Modified Files: ChangeLog Log Message: [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly Test case schema incorrect Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.792 retrieving revision 1.793 diff -u -d -r1.792 -r1.793 --- ChangeLog 6 Jul 2012 22:52:54 -0000 1.792 +++ ChangeLog 10 Jul 2012 16:29:04 -0000 1.793 @@ -1,3 +1,9 @@ +2012-07-10 Michael Chase-Salerno <br...@li...> + + * test/stageschema.sh: + [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly + Test case schema incorrect + 2012-07-06 Chris Buccella <buc...@li...> * internalProvider.c, providerMgr.c: |
From: Michael Chase-S. <mc...@us...> - 2012-07-10 16:24:37
|
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 a73f4d580ff22fe0d6f672fdb2f432160b2dc986 (commit) from 6f0bb8b21e228e869156c02b26d415ec4863c27d (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 a73f4d580ff22fe0d6f672fdb2f432160b2dc986 Author: Michael Chase-Salerno <br...@li...> Date: Tue Jul 10 12:23:57 2012 -0400 [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly Test case schema incorrect ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 2bc8ef1..c96d50d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-07-10 Michael Chase-Salerno <br...@li...> + + * test/stageschema.sh, test/schema/root/interop2/*: + [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly + Test case schema incorrect + 2012-07-09 Narasimha Sharoff <nsh...@us...> * interopProvider.c, sfcCustomLib.c, support.c: @@ -35,7 +41,6 @@ * brokerUpc.c, indCIMXMLExport.c, indCIMXMLHandler.c, interopProvider.c, support.c, support.h: - [ 3539006 ] Possible indication deadlock 2012-06-28 Narasimha Sharoff <nsh...@us...> diff --git a/test/schema/root/interop2/Test_Indication.mof b/test/schema/root/interop2/Test_Indication.mof deleted file mode 100644 index 01e4480..0000000 --- a/test/schema/root/interop2/Test_Indication.mof +++ /dev/null @@ -1,6 +0,0 @@ -[Indication] -class Test_Indication : CIM_ProcessIndication -{ - string MethodName; - [Static] uint32 SendTestIndication(); -}; diff --git a/test/schema/root/interop2/Test_Indication.reg b/test/schema/root/interop2/Test_Indication.reg deleted file mode 100644 index bc8d15e..0000000 --- a/test/schema/root/interop2/Test_Indication.reg +++ /dev/null @@ -1,6 +0,0 @@ -[Test_Indication] - provider: TestIndicationProvider - location: TestIndicationProvider - type: indication method - namespace: root/interop -# diff --git a/test/stageschema.sh b/test/stageschema.sh index cb669ce..f675ee7 100755 --- a/test/stageschema.sh +++ b/test/stageschema.sh @@ -21,7 +21,7 @@ usage() echo "usage: $0 [-p prefix] [ -d testschemadir] [ -u ] " 1>&2 } -NAMESPACE_DIRS="root/cimv2 root/interop root/interop2" +NAMESPACE_DIRS="root/cimv2 root/interop" unstage=0 args=`getopt p:d:u $*` hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-07-09 18:34:19
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv32505 Modified Files: NEWS sfcCustomLib.c Log Message: [ 3538858 ] custom routine to log indInst objinfo Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.707 retrieving revision 1.708 diff -u -d -r1.707 -r1.708 --- NEWS 5 Jul 2012 23:04:47 -0000 1.707 +++ NEWS 9 Jul 2012 18:34:17 -0000 1.708 @@ -1,6 +1,7 @@ Changes in 1.3.16 ================= - +New features: +- 3538858 custom routine to log indInst objinfo Bugs fixed: - 3539569 Leaks in interopProvider @@ -8,7 +9,6 @@ - 3539557 Memory leak in providerDrv with property list - 3539555 Memory leak in TestInstanceProvider - 1901737 Memory leak in internalProvider.c -- 3538858 custom routine to log indInst objinfo Changes in 1.3.15 ================= Index: sfcCustomLib.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcCustomLib.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sfcCustomLib.c 5 Jul 2012 23:04:47 -0000 1.2 +++ sfcCustomLib.c 9 Jul 2012 18:34:17 -0000 1.3 @@ -80,11 +80,10 @@ { /* example - log to /tmp/indAudit.log FILE *fp; - char *ts = ctime(&t); fp = fopen("/tmp/indAudit.log", "a+"); if (fp != NULL) { - fwrite(operation, strlen(action), 1, fp); - fwrite(objinfo, strlen(msg), 1, fp); + fwrite(operation, strlen(operation), 1, fp); + fwrite(objinfo, strlen(objinfo), 1, fp); fwrite("\n\n",2,1,fp); fflush(fp); fclose(fp); |
From: Narasimha S. <nsh...@us...> - 2012-07-09 17:09:11
|
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 6f0bb8b21e228e869156c02b26d415ec4863c27d (commit) from 194139e9b866dbb5d74f5e2eef20c0864d19e238 (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 6f0bb8b21e228e869156c02b26d415ec4863c27d Author: Narasimha Sharoff <nsh...@us...> Date: Mon Jul 9 10:08:01 2012 -0700 [ 3538858 ] custom routine to log indInst objinfo Signed-off-by: Narasimha Sharoff <nsh...@us...> ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 34ff16c..2bc8ef1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-07-09 Narasimha Sharoff <nsh...@us...> + + * interopProvider.c, sfcCustomLib.c, support.c: + [ 3538858 ] custom routine to log indInst objinfo + 2012-07-06 Chris Buccella <buc...@li...> * test/TestProviders/cmpiTestIndicationProvider.c, diff --git a/NEWS b/NEWS index 75e373b..bc906d3 100644 --- a/NEWS +++ b/NEWS @@ -95,6 +95,9 @@ Everything in 1.3.10, plus: Changes in 1.3.16 ================= +New Features: +- 3538858 custom routine to log indInst objinfo + Bugs fixed: - 3539006 Possible indication deadlock @@ -104,6 +107,9 @@ Bugs fixed: - 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled - 3539569 Leaks in interopProvider +New Features: +- 3501314 Add dynamic logging and syslog output to sfcb trace + Changes in 1.3.15 ================= diff --git a/interopProvider.c b/interopProvider.c index 00afaa9..548fabc 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -53,6 +53,7 @@ extern void closeProviderContext(BinRequestContext * ctx); extern void setStatus(CMPIStatus *st, CMPIrc rc, char *msg); extern int testNameSpace(char *ns, CMPIStatus *st); extern void memLinkObjectPath(CMPIObjectPath * op); +extern void sfcbIndAuditLog(char *, char *); // Counts to enforce limits from cfg file static int LDcount=0; @@ -1292,6 +1293,8 @@ InteropProviderCreateInstance(CMPIInstanceMI * mi, _broker->bft->createInstance(_broker, ctxLocal, copLocal, ciLocal, &st)); + sfcbIndAuditLog("CreateInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } @@ -1392,6 +1395,8 @@ InteropProviderModifyInstance(CMPIInstanceMI * mi, ctxLocal = prepareUpcall((CMPIContext *) ctx); st = _broker->bft->modifyInstance(_broker, ctxLocal, cop, ci, properties); + sfcbIndAuditLog("Subscription:ModifyInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } _SFCB_RETURN(st); @@ -1471,6 +1476,8 @@ InteropProviderDeleteInstance(CMPIInstanceMI * mi, if (st.rc == CMPI_RC_OK) { ctxLocal = prepareUpcall((CMPIContext *) ctx); st = _broker->bft->deleteInstance(_broker, ctxLocal, cop); + sfcbIndAuditLog("DeleteInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } @@ -1656,6 +1663,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, ("--- _addHandler %s %s", (char *) ns->hdl, (char *) str->hdl)); addHandler(ci, op); + sfcbIndAuditLog("CreateHandler-> ", + CMGetCharPtr(CMObjectPathToString(op, NULL))); } else if (strcasecmp(methodName, "_removeHandler") == 0) { @@ -1668,6 +1677,8 @@ InteropProviderInvokeMethod(CMPIMethodMI * mi, } else removeHandler(ha, key); LDcount--; + sfcbIndAuditLog("RemoveHandler-> ", + CMGetCharPtr(CMObjectPathToString(op, NULL))); } else { setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Handler object not found"); } diff --git a/sfcCustomLib.c b/sfcCustomLib.c index f331461..8bd6ea3 100644 --- a/sfcCustomLib.c +++ b/sfcCustomLib.c @@ -68,3 +68,26 @@ extern int _sfcbGetResponseHostname(char *httpHost, char **hostname, unsigned in return 0; } + +/** \brief _sfcbIndAuditLog - log create, delete, and modify calls + * + * Provides object information for indication create, delete, and modify + * Default action: return + * operation - create/delete/modify + * objinfo - information on the object +*/ +extern void _sfcbIndAuditLog(char *operation, char *objinfo) +{ + /* example - log to /tmp/indAudit.log + FILE *fp; + fp = fopen("/tmp/indAudit.log", "a+"); + if (fp != NULL) { + fwrite(operation, strlen(operation), 1, fp); + fwrite(objinfo, strlen(objinfo), 1, fp); + fwrite("\n\n",1,1,fp); + fflush(fp); + fclose(fp); + } + */ + return; +} diff --git a/support.c b/support.c index 1772bfb..db3d042 100644 --- a/support.c +++ b/support.c @@ -1096,9 +1096,11 @@ extern void libraryName(const char *dir, const char *location, typedef int (*getSfcbHostname)(char *httpHost, char **hostname, unsigned int len); typedef int (*getSfcbSlpHostname)(char **hostname); +typedef void (*sfcbLog)(char *operation, char *objinfo); static void *hostnameLib; static getSfcbHostname sfcbHostname; static getSfcbSlpHostname sfcbSlpHostname; +static sfcbLog indAuditLog; int loadHostnameLib() { char *ln; @@ -1123,6 +1125,13 @@ int loadHostnameLib() dlclose(hostnameLib); return -1; } + dlerror(); + indAuditLog = dlsym(hostnameLib, "_sfcbIndAuditLog"); + if ((err = dlerror()) != NULL) { + printf("dlsym failed for _sfcbIndAuditLog: %s\n", err); + dlclose(hostnameLib); + return -1; + } } else { printf("dlopen failed for sfcbCustomLib\n"); @@ -1149,6 +1158,12 @@ int getCustomSlpHostname(char **hn) return -1; } +void sfcbIndAuditLog(char *operation, char *objinfo) +{ + if (indAuditLog) return(indAuditLog(operation, objinfo)); + return; +} + void unloadHostnameLib() { if (hostnameLib) dlclose(hostnameLib); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Dave H. <hel...@us...> - 2012-07-07 00:59:31
|
Update of /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples In directory vz-cvs-3.sog:/tmp/cvs-serv9662/smpl/org/sblim/cimclient/samples Modified Files: Tag: Experimental Jsr48IndicationTester.java Log Message: 3529066 - Jsr48IndicationTester print classname with brief output Index: Jsr48IndicationTester.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples/Attic/Jsr48IndicationTester.java,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -d -r1.1.2.1 -r1.1.2.2 --- Jsr48IndicationTester.java 6 Jul 2012 23:06:02 -0000 1.1.2.1 +++ Jsr48IndicationTester.java 7 Jul 2012 00:59:27 -0000 1.1.2.2 @@ -142,8 +142,9 @@ public void indicationOccured(String pIndicationURL, CIMInstance pIndication, InetAddress pSenderAddress) { - System.out.println("Indication received on: " + pIndicationURL + ": from IP: " - + pSenderAddress.getHostAddress()); + System.out.println("Indication received on: " + pIndicationURL + + ": from IP: " + pSenderAddress.getHostAddress() + + ": classname: " + pIndication.getClassName()); } }; IndicationListenerSBLIM ilsDetail = new IndicationListenerSBLIM() { |
From: Dave H. <hel...@us...> - 2012-07-06 23:06:04
|
Update of /cvsroot/sblim/jsr48-client/smpl/org/sblim/cimclient/samples In directory vz-cvs-3.sog:/tmp/cvs-serv30667/smpl/org/sblim/cimclient/samples Added Files: Tag: Experimental Jsr48IndicationTester.java Log Message: 3529066 - Jsr48IndicationTester initial version --- NEW FILE: Jsr48IndicationTester.java --- /** * (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 : Alexander Wolf-Reber, a.w...@de... * @author : Dave Heller, hel...@us... * * Flag Date Prog Description * ------------------------------------------------------------------------------- * 3529066 2012-07-06 hellerda Add Jsr48IndicationTester (initial version) */ package org.sblim.cimclient.samples; import java.io.IOException; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.URL; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Properties; import javax.cim.CIMArgument; import javax.cim.CIMDataType; import javax.cim.CIMInstance; import javax.cim.CIMObjectPath; import javax.cim.CIMProperty; import javax.cim.UnsignedInteger16; import javax.security.auth.Subject; import javax.wbem.WBEMException; import javax.wbem.client.PasswordCredential; import javax.wbem.client.UserPrincipal; import javax.wbem.client.WBEMClient; import javax.wbem.client.WBEMClientConstants; import javax.wbem.client.WBEMClientFactory; import javax.wbem.listener.WBEMListener; import javax.wbem.listener.WBEMListenerFactory; import org.sblim.cimclient.IndicationListenerSBLIM; import org.sblim.cimclient.WBEMClientSBLIM; import org.sblim.cimclient.WBEMListenerSBLIM; /** * Class Jsr48IndicationTester is an interactive, command line program that * facilitates testing of end-to-end indication delivery between CIMOM and * the SBLIM Java CIM Client. The program starts an indication listener, sends * a subscription request to the CIMOM and reports any indications received by * the listener. The listener will continue to wait for new indications until * a keyboard interrupt is received or the timer expired. An indication can be * triggered via the program's trigger-mode, intended to be run from a separate * console. An indication may also triggered by some independent means. * The program is based on the Java CIM Client Jsr48IndicationSample programs. */ public abstract class Jsr48IndicationTester { private static CIMObjectPath cSubscriptionPath; private static CIMObjectPath cFilterPath; private static CIMObjectPath cDestinationPath; private static WBEMListener cListener; private static int cId = 0; /** * Initializes a CIM client connection to a given CIMOM. Note that the * initialization will not lead to client<->CIMOM communication, the first * request will be sent to the CIMOM when the first operation is executed. * * @param pWbemUrl * The URL of the WBEM service (e.g. * <code>https://myhost.mydomain.com:5989</code>) * @param pUser * The user name for authenticating with the WBEM service * @param pPassword * The corresponding password * @return A <code>WBEMClient</code> instance if connect was successful, * <code>null</code> otherwise */ private static WBEMClient connect(final URL pWbemUrl, final String pUser, final String pPassword) { try { final WBEMClient client = WBEMClientFactory .getClient(WBEMClientConstants.PROTOCOL_CIMXML); final CIMObjectPath path = new CIMObjectPath(pWbemUrl.getProtocol(), pWbemUrl.getHost(), String.valueOf(pWbemUrl.getPort()), null, null, null); final Subject subject = new Subject(); if (pUser != null && pPassword != null) { subject.getPrincipals().add(new UserPrincipal(pUser)); subject.getPrivateCredentials().add(new PasswordCredential(pPassword)); } client.initialize(path, subject, new Locale[] { Locale.US }); return client; } catch (final Exception e) { e.printStackTrace(); } return null; } /** * Starts a reliable listener. The JSR48 library will open a HTTP(S) server * socket and listen for incoming indications on that socket. Any * indications received will be forwarded to the registered * IndicationListener implementation. The sample one here just prints the * indication to stdout along with a message indicating whether the CIMOM * supports reliable indications. * * @param pDestURL * The URL of the destination * @param pPrintInd * Flag indicating whether to print indication details * * @return <code>true</code> if the listener could be started, * <code>false</code> otherwise. */ public static boolean startListener(URL pDestURL, boolean pPrintInd) { try { cListener = WBEMListenerFactory.getListener(WBEMClientConstants.PROTOCOL_CIMXML); // Cast WBEMListener to WBEMListenerSBLIM to get access to the // addListener() method that accepts properties - this method is not // part of the JSR48 standard, but is a SBLIM addition WBEMListenerSBLIM sListener = (WBEMListenerSBLIM) cListener; // Enable reliable indications using 2 retries at intervals of 30 // seconds Properties props = new Properties(); props.setProperty("sblim.wbem.listenerEnableReliableIndications", "true"); props.setProperty("sblim.wbem.listenerDeliveryRetryAttempts", "2"); props.setProperty("sblim.wbem.listenerDeliveryRetryInterval", "30"); IndicationListenerSBLIM ilsBrief = new IndicationListenerSBLIM() { public void indicationOccured(String pIndicationURL, CIMInstance pIndication, InetAddress pSenderAddress) { System.out.println("Indication received on: " + pIndicationURL + ": from IP: " + pSenderAddress.getHostAddress()); } }; IndicationListenerSBLIM ilsDetail = new IndicationListenerSBLIM() { public void indicationOccured(String pIndicationURL, CIMInstance pIndication, InetAddress pSenderAddress) { System.out.println("Indication received on: " + pIndicationURL + ": from IP: " + pSenderAddress.getHostAddress()); try { URL parsedURL = new URL(pIndicationURL); System.out.println("The URL could be parsed, path is: " + parsedURL.getPath()); } catch (MalformedURLException e) { System.out.println("The URL could NOT be parsed: " + e); } System.out.println(Jsr48CimSample.toMof(pIndication)); CIMProperty<?> context = pIndication.getProperty("SequenceContext"); CIMProperty<?> number = pIndication.getProperty("SequenceNumber"); System.out.println("Based on content of indication, CIMOM DOES" + (context == null || number == null || context.getValue() == null || number.getValue() == null ? " NOT " : " ") + "support reliable indications."); } }; System.out.printf("Added listener on port %d.\n\n", Integer.valueOf( sListener.addListener(pPrintInd ? ilsDetail : ilsBrief, pDestURL.getPort(), pDestURL.getProtocol(), null, props))); return true; } catch (IOException e) { // nothing to do here } return false; } /** * Constructs a CIM_ListenerDestinationCIMXML instance * * @param pInteropNS * The scoping namespace * @param pURL * The URL of the destination * @param pHost * The host name of the WBEM service's URL * @return The instance * @throws UnknownHostException * If "localhost" could not be resolved */ private static CIMInstance makeListenerDestination(String pInteropNS, String pURL, String pHost) throws UnknownHostException { final CIMProperty<String> name = new CIMProperty<String>("Name", CIMDataType.STRING_T, "JSR48SampleListener" + getNextId(), true, false, null); final CIMProperty<String> creationClassName = new CIMProperty<String>("CreationClassName", CIMDataType.STRING_T, "CIM_ListenerDestinationCIMXML", true, false, null); final CIMProperty<String> systemName = new CIMProperty<String>("SystemName", CIMDataType.STRING_T, InetAddress.getByName(pHost).getHostName(), true, false, null); final CIMProperty<String> systemCCN = new CIMProperty<String>("SystemCreationClassName", CIMDataType.STRING_T, "CIM_ComputerSystem", true, false, null); final CIMProperty<String> destination = new CIMProperty<String>("Destination", CIMDataType.STRING_T, pURL, false, false, null); final CIMProperty<UnsignedInteger16> persistenceType = new CIMProperty<UnsignedInteger16>( "PersistenceType", CIMDataType.UINT16_T, new UnsignedInteger16(3), false, false, null); final CIMProperty<?>[] properties = new CIMProperty[] { name, creationClassName, systemName, systemCCN, destination, persistenceType }; final CIMObjectPath path = new CIMObjectPath(null, null, null, pInteropNS, "CIM_ListenerDestinationCIMXML", null); return new CIMInstance(path, properties); } /** * Constructs a CIM_IndicationFilter instance * * @param pInteropNS * The scoping namespace * @param pIndicationNS * The namespace in which the indication provider is registered * @param pQuery * The WQL query of the filter * @param pHost * The host name of the WBEM service's URL * @return The instance * @throws UnknownHostException * If "localhost" could not be resolved */ private static CIMInstance makeFilter(String pInteropNS, String pIndicationNS, String pQuery, String pHost) throws UnknownHostException { final CIMProperty<String> name = new CIMProperty<String>("Name", CIMDataType.STRING_T, "JSR48SampleFilter" + getNextId(), true, false, null); final CIMProperty<String> creationClassName = new CIMProperty<String>("CreationClassName", CIMDataType.STRING_T, "CIM_IndicationFilter", true, false, null); final CIMProperty<String> systemName = new CIMProperty<String>("SystemName", CIMDataType.STRING_T, InetAddress.getByName(pHost).getHostName(), true, false, null); final CIMProperty<String> systemCCN = new CIMProperty<String>("SystemCreationClassName", CIMDataType.STRING_T, "CIM_ComputerSystem", true, false, null); final CIMProperty<String> query = new CIMProperty<String>("Query", CIMDataType.STRING_T, pQuery, false, false, null); final CIMProperty<String> queryLanguage = new CIMProperty<String>("QueryLanguage", CIMDataType.STRING_T, "WQL", false, false, null); final CIMProperty<String> sourceNameSpace = new CIMProperty<String>("SourceNamespace", CIMDataType.STRING_T, pIndicationNS, false, false, null); final CIMProperty<?>[] properties = new CIMProperty[] { name, creationClassName, systemName, systemCCN, query, queryLanguage, sourceNameSpace }; final CIMObjectPath path = new CIMObjectPath(null, null, null, pInteropNS, "CIM_IndicationFilter", null); return new CIMInstance(path, properties); } /** * Constructs a CIM_IndicationSubscription association * * @param pInteropNS * The scoping namespace * @param pDestinationPath * The path of the handler * @param pFilterPath * The path of the filter * @return The association instance */ private static CIMInstance makeSubscription(String pInteropNS, CIMObjectPath pDestinationPath, CIMObjectPath pFilterPath) { final CIMProperty<CIMObjectPath> name = new CIMProperty<CIMObjectPath>("Handler", new CIMDataType("CIM_ListenerDestinationCIMXML"), pDestinationPath, true, false, null); final CIMProperty<CIMObjectPath> creationClassName = new CIMProperty<CIMObjectPath>( "Filter", new CIMDataType("CIM_IndicationFilter"), pFilterPath, true, false, null); final CIMProperty<?>[] properties = new CIMProperty[] { name, creationClassName }; final CIMObjectPath path = new CIMObjectPath(null, null, null, pInteropNS, "CIM_IndicationSubscription", null); return new CIMInstance(path, properties); } /** * Returns a monotonically increasing sequence of integers on subsequent * calls * * @return An integer */ private static String getNextId() { return String.valueOf(++cId); } /** * Creates the three CIM instances necessary for making a subscription on * all CIM_InstCreation indication in this namespace * * @param pClient * The WBEM client to use * @param pInteropNS * The scoping namespace * @param pIndicationNS * The namespace in which the indication provider is registered * @param pHost * The host name of the WBEM service's URL * @param pDestURL * The URL of the destination * @param pQuery * The WQL query string for the filter * @return <code>true</code> if the subscription succeeds, * <code>false</code> otherwise */ public static boolean subscribe(WBEMClient pClient, String pInteropNS, String pIndicationNS, String pHost, URL pDestURL, String pQuery) { try { cDestinationPath = pClient.createInstance(makeListenerDestination(pInteropNS, pDestURL.getProtocol() + "://" + pDestURL.getHost() + ":" + pDestURL.getPort() + "/create", pHost)); cFilterPath = pClient.createInstance(makeFilter(pInteropNS, pIndicationNS, pQuery, pHost)); cSubscriptionPath = pClient.createInstance(makeSubscription(pInteropNS, cDestinationPath, cFilterPath)); return true; } catch (WBEMException e) { e.printStackTrace(); } catch (UnknownHostException e) { e.printStackTrace(); } return false; } /** * Cleans up the instances of the subscription we've made. * * @param pClient * The WBEM client to use * @param pNamespace * The namespace we've subscribed in */ private static void unsubscribe(WBEMClient pClient, String pNamespace) { if (cSubscriptionPath != null) { try { pClient.deleteInstance(cSubscriptionPath); } catch (WBEMException e) { e.printStackTrace(); } } if (cFilterPath != null) { try { pClient.deleteInstance(cFilterPath); } catch (WBEMException e) { e.printStackTrace(); } } if (cDestinationPath != null) { try { pClient.deleteInstance(cDestinationPath); } catch (WBEMException e) { e.printStackTrace(); } } } /** * Print usage */ private static void printUsage() { System.out.println("Usage: Jsr48IndicationTester [options] provider"); System.out.println("example: Jsr48IndicationTester -p Test_Indication"); } /** * Print help */ private static void printHelp() { System.out.println("\nOptions:"); System.out.println(" -h, Show this help message and exit."); System.out.println(" -p, Print received indications to stdout."); System.out.println(" -v, Print additional debug info."); System.out.println(" -t, Trigger mode: send a request to the CIMOM"); System.out.println(" to trigger an indication and exit."); System.out.println(" --cimomUrl CIMOMURL URL of CIMOM to connect to (host:port)"); System.out.println(" (default: http://localhost:5988)"); System.out.println(" --destUrl DESTURL URL of destination handler"); System.out.println(" (default: http://localhost:7000)"); System.out.println(" --intNS INTEROPNS Interop namespace name (default: root/interop)"); System.out.println(" --indNS INDICATIONNS Namespace in which the register the indication"); System.out.println(" (default is the same value as the interop namespace)"); } /** * Print all the elements of a URL */ private static void printURL(URL url) { System.out.printf("Full URL string : %s\n", url.toString()); System.out.printf("Protocol (scheme) : %s\n", url.getProtocol()); System.out.printf("Authority : %s\n", url.getAuthority()); System.out.printf("Host : %s\n", url.getHost()); System.out.printf("Port : %d\n", Integer.valueOf(url.getPort())); System.out.printf("UserInfo : %s\n", url.getUserInfo()); if (url.getUserInfo() != null) { String[] userInfo = url.getUserInfo().split(":"); System.out.printf("-username : %s\n", userInfo[0]); if (userInfo.length > 1) System.out.printf("-password : %s\n", userInfo[1]); } System.out.printf("File : %s\n", url.getFile()); System.out.printf("Path : %s\n", url.getPath()); System.out.printf("Query : %s\n", url.getQuery()); System.out.printf("Ref : %s\n", url.getRef()); try { System.out.printf("InetAddress.getHostAddress(): %s\n", InetAddress.getByName(url.getHost()).getHostAddress()); System.out.printf("InetAddress.getHostName() : %s\n", InetAddress.getByName(url.getHost()).getHostName()); } catch (UnknownHostException e) { e.printStackTrace(); } } /** * Check that namespace is valid, apply default prefix if necessary */ private static String chkNamespace(String pNamespace) { int fields = pNamespace.split("/").length; if (fields == 1) return "root/" + pNamespace; else if (fields == 2) return pNamespace; else { throw new IllegalArgumentException("Invalid namespace: " + pNamespace); } } /** * Cleanup at shutdown or keyboard interrupt (ctrl-C). */ static void cleanup(WBEMClient client, String namespace, URL destURL) { unsubscribe(client, namespace); cListener.removeListener(destURL.getPort()); client.close(); System.out.println("Cleaned up. Sample completed."); } /** * Runs the sample. Will start a listener, subscribe for InstCreation * indications, create an instance, catch the indication and final clean up * and shut down. * * @param args * A String array containing { CIMOM_URL, USER, PASSWORD, * NAMESPACE }, e.g. { "http://myserver.mydomain.com:5988", * "user", "pw", "root/interop" } */ static public void main(String[] args) { try { // Parse command line arguments List<String> orphanArgs = new ArrayList<String>(); List<String> singleDashOpts = new ArrayList<String>(); Map<String,String> doubleDashOpts = new HashMap<String,String>(); for (int i=0; i < args.length; i++) { if (args[i].charAt(0) == '-') { if (args[i].length() < 2) throw new IllegalArgumentException("Invalid argument: " + args[i]); if (args[i].charAt(1) == '-') { if (i >= args.length-1) throw new IllegalArgumentException("Expected arg after: " + args[i]); if (args[i].length() < 3) throw new IllegalArgumentException("Invalid argument: " + args[i]); doubleDashOpts.put(args[i].toLowerCase(), args[i+1]); i++; } else { if (args[i].length() > 2) throw new IllegalArgumentException("Invalid argument: " + args[i]); singleDashOpts.add(args[i]); } } else { orphanArgs.add(args[i]); } } boolean help = singleDashOpts.contains("-h") ? true : false; boolean printInd = singleDashOpts.contains("-p") ? true : false; boolean trigger = singleDashOpts.contains("-t") ? true : false; boolean verbose = singleDashOpts.contains("-v") ? true : false; if (help) { printUsage(); printHelp(); System.exit(0); } // If indication namespace not specified, use interop namespace final String interopNS = doubleDashOpts.containsKey("--intns") ? chkNamespace(doubleDashOpts.get("--intns")) : "root/interop"; final String indicationNS = doubleDashOpts.containsKey("--indns") ? chkNamespace(doubleDashOpts.get("--indns")) : interopNS; final URL cimomURL = doubleDashOpts.containsKey("--cimomurl") ? new URL(doubleDashOpts.get("--cimomurl")) : new URL("http://localhost:5988"); final URL destURL = doubleDashOpts.containsKey("--desturl") ? new URL(doubleDashOpts.get("--desturl")) : new URL("http://localhost:7000"); String userInfo = cimomURL.getUserInfo(); final String cimomUser = (userInfo != null) ? userInfo.split(":")[0] : null; final String cimomPasswd = (userInfo != null) ? userInfo.split(":")[1] : null; if (orphanArgs.isEmpty()) throw new IllegalArgumentException("No indication classname provided"); else if (orphanArgs.size() > 1) throw new IllegalArgumentException("Garbled command: too many arguments"); final String indClassName = orphanArgs.get(0); if (verbose) { System.out.println("==> Command-line parameters:"); System.out.println("CIMOM URL: " + cimomURL.toString()); System.out.println("Destination URL: " + destURL.toString()); System.out.println("Interop namespace: " + interopNS); System.out.println("Indication namespace: " + indicationNS); System.out.println("Indication class: " + indClassName); System.out.println("==> CIMOM URL detail:"); printURL(cimomURL); System.out.println("==> Destination URL detail:"); printURL(destURL); } // Initialize client. This will not trigger any communication with // the CIMOM. final WBEMClientSBLIM client = (WBEMClientSBLIM) connect(cimomURL, cimomUser, cimomPasswd); if (client == null) { System.err.println("Client init failed. Probably due to invalid cl parameters."); printUsage(); return; } if (trigger) { // SendTestIndication does not use any in/out parameters CIMArgument<?>[] input = new CIMArgument[0]; CIMArgument<?>[] output = new CIMArgument[0]; // This will trigger a TestIndication that is caught by the // remote listener Object obj = client.invokeMethod(new CIMObjectPath(null, null, null, indicationNS, indClassName, null), "SendTestIndication", input, output); if (obj.toString().equals("0")) System.out.println("Indication generated successfully."); else System.out.println("Indication not generated successfully!"); System.exit(0); } // cleanup at shutdown or keyboard interrupt (ctrl-C) Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { cleanup(client, interopNS, destURL); } }); // start the listener so that we are "on air" when the indications // come in if (startListener(destURL, printInd)) { System.out.println("Listener started."); } else { System.err.println("Listener startup failed. Most probably the port " + destURL.getPort() + " is not available."); client.close(); return; } try { // make the subscription. Since this is the first WBEM operation // called, the client will connect to the CIMOM now. If we've // any connectivity or authentication problems the WBEMException // will be thrown right in the subscribe method. String query = "SELECT * FROM " + indClassName; if (subscribe(client, interopNS, indicationNS, cimomURL.getHost(), destURL, query)) { System.out.println("Successfully subscribed."); } else { System.err.println("Subscription failed."); return; } Thread.sleep(300*1000); } finally { // should never get here as we have ShutdownHook to catch exit } } catch (IllegalArgumentException e) { System.err.println("Error: " + e.getMessage()); printUsage(); } catch (Exception e) { e.printStackTrace(); } } } |
From: Chris B. <buc...@us...> - 2012-07-06 22:52:56
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv25755 Modified Files: internalProvider.c providerMgr.c ChangeLog Log Message: Discrepancy between original patch (git) for 1901737 resulted in crash. Fixed. Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- providerMgr.c 3 Jul 2012 02:11:19 -0000 1.83 +++ providerMgr.c 6 Jul 2012 22:52:54 -0000 1.84 @@ -1746,7 +1746,7 @@ ul = UtilFactory->newList(); for (i = 0, m = CMGetArrayCount(ar, NULL); i < m; i++) { char *name=CMGetArrayElementAt(ar,i,NULL).value.string->hdl; - if (name) ul->ft->append(ul,name); + if (name) ul->ft->append(ul,strdup(name)); _SFCB_TRACE(1,("--- assoc %s",name)); } } Index: internalProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/internalProvider.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- internalProvider.c 3 Jul 2012 02:11:18 -0000 1.45 +++ internalProvider.c 6 Jul 2012 22:52:54 -0000 1.46 @@ -692,8 +692,8 @@ CMPIInstance *aci=CBGetInstance(Broker,ctx,data.value.ref,propertyList,&st); assocs->ft->put(assocs, strdup(an->ft->getCharPtr(an)), aci); } + an->ft->release(an); } - an->ft->release(an); } else { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.791 retrieving revision 1.792 diff -u -d -r1.791 -r1.792 --- ChangeLog 5 Jul 2012 23:04:46 -0000 1.791 +++ ChangeLog 6 Jul 2012 22:52:54 -0000 1.792 @@ -1,3 +1,8 @@ +2012-07-06 Chris Buccella <buc...@li...> + + * internalProvider.c, providerMgr.c: + Discrepancy between original patch (git) for 1901737 resulted in crash. Fixed. + 2012-07-05 Narasimha Sharoff <nsh...@us...> * interopProvider.c, sfcCustomLib.c, support.c: |
From: Chris B. <buc...@us...> - 2012-07-06 22:05:39
|
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 194139e9b866dbb5d74f5e2eef20c0864d19e238 (commit) via 98d51ce78c14f51328132866db188a4431338a41 (commit) from 7bba0e8f89428f68feff87567c616de2f8b102a8 (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 194139e9b866dbb5d74f5e2eef20c0864d19e238 Author: buccella <buc...@li...> Date: Fri Jul 6 18:05:43 2012 -0400 updated tests for 3532494 (Sourcenamespaces) commit 98d51ce78c14f51328132866db188a4431338a41 Author: buccella <buc...@li...> Date: Thu Jul 5 17:00:11 2012 -0400 added root/interop2 ns for tests ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 6987bcc..34ff16c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-07-06 Chris Buccella <buc...@li...> + + * test/TestProviders/cmpiTestIndicationProvider.c, + test/TestProviders/tests/IndRetryTest.sh, + test/TestProviders/tests/IndTest1CreateFilter.xml, + test/schema/root/interop/Test_Indication.reg, + schema/root/interop2/Test_Indication.mof, + test/stageschema.sh: + [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly + Test case for additional source namespace + 2012-07-02 Chris Buccella <buc...@li...> * interopProvider.c: diff --git a/test/TestProviders/cmpiTestIndicationProvider.c b/test/TestProviders/cmpiTestIndicationProvider.c index 0e9a7e5..629ba7f 100644 --- a/test/TestProviders/cmpiTestIndicationProvider.c +++ b/test/TestProviders/cmpiTestIndicationProvider.c @@ -14,7 +14,11 @@ unsigned char CMPI_true = 1; unsigned char CMPI_false = 0; static int enabled = 0; +static int activated = 0; +static int activated2 = 0; static int _nextUID = 0; +static int gen1 = 0; +static int gen2 = 0; static void generateIndication(const char *methodname, const CMPIContext *ctx) @@ -27,7 +31,7 @@ generateIndication(const char *methodname, const CMPIContext *ctx) CMPIStatus rc; char buffer[32]; - if (enabled) { + if (enabled && activated) { cop = CMNewObjectPath(broker, "root/interop", "Test_Indication", &rc); inst = CMNewInstance(broker, cop, &rc); @@ -46,10 +50,47 @@ generateIndication(const char *methodname, const CMPIContext *ctx) if (rc.rc != CMPI_RC_OK) { fprintf(stderr, "+++ Could not send the indication!\n"); } + gen1++; } - fprintf(stderr, "+++ generateIndication() done\n"); + fprintf(stderr, "+++ generateIndication() done %d\n", gen1); } +static void +generateIndication2(const char *methodname, const CMPIContext *ctx) +{ + + CMPIInstance *inst; + CMPIObjectPath *cop; + CMPIDateTime *dat; + CMPIArray *ar; + CMPIStatus rc; + char buffer[32]; + + if (enabled && activated2) { + cop = CMNewObjectPath(broker, "root/interop2", "Test_Indication", &rc); + inst = CMNewInstance(broker, cop, &rc); + + sprintf(buffer, "%d", _nextUID++); + CMSetProperty(inst, "IndicationIdentifier", buffer, CMPI_chars); + + dat = CMNewDateTime(broker, &rc); + CMSetProperty(inst, "IndicationTime", &dat, CMPI_dateTime); + + CMSetProperty(inst, "MethodName", methodname, CMPI_chars); + + ar = CMNewArray(broker, 0, CMPI_string, &rc); + CMSetProperty(inst, "CorrelatedIndications", &ar, CMPI_stringA); + + rc = CBDeliverIndication(broker, ctx, "root/interop", inst); + if (rc.rc != CMPI_RC_OK) { + fprintf(stderr, "+++ Could not send the indication!\n"); + } + gen2++; + } + fprintf(stderr, "+++ generateIndication2() done %d\n", gen2); +} + + // ---------------------------------------------------------- // --- // Method Provider @@ -74,6 +115,7 @@ CMPIStatus indProvInvokeMethod fprintf(stderr, "+++ PROVIDER NOT ENABLED\n"); } else { generateIndication(method, ctx); + generateIndication2(method, ctx); } value.uint32 = 0; @@ -115,7 +157,15 @@ CMPIStatus indProvActivateFilter (CMPIIndicationMI * cThis, const CMPIContext *ctx, const CMPISelectExp *exp, const char *clsName, const CMPIObjectPath * classPath, CMPIBoolean firstActivation) { - fprintf(stderr, "+++ indProvActivateFilter()\n"); + + char* op = CMGetCharPtr(CMObjectPathToString(classPath, NULL)); + fprintf (stderr, "+++ indProvActivateFilter() for %s\n", op); + + if (strcmp(op, "root/interop:Test_Indication") == 0) + activated = 1; + else if (strcmp(op, "root/interop2:Test_Indication") == 0) + activated2 = 1; + CMReturn(CMPI_RC_OK); } @@ -124,6 +174,15 @@ CMPIStatus indProvDeActivateFilter const CMPISelectExp *filter, const char *clsName, const CMPIObjectPath * classPath, CMPIBoolean lastActivation) { fprintf(stderr, "+++ indProvDeActivateFilter\n"); + + char* op = CMGetCharPtr(CMObjectPathToString(classPath, NULL)); + fprintf (stderr, "+++ indProvDeActivateFilter for %s\n", op); + + if (strcmp(op, "root/interop:Test_Indication") == 0) + activated = 0; + else if (strcmp(op, "root/interop2:Test_Indication") == 0) + activated2 = 0; + CMReturn(CMPI_RC_OK); } diff --git a/test/TestProviders/tests/IndRetryTest.sh b/test/TestProviders/tests/IndRetryTest.sh index aed9f3e..aa40b34 100755 --- a/test/TestProviders/tests/IndRetryTest.sh +++ b/test/TestProviders/tests/IndRetryTest.sh @@ -21,7 +21,7 @@ # =========================================================================== # Indication flood limit (don't set less than 101) -lim=1000 +lim=500 sendxml () { @@ -303,8 +303,11 @@ do j=$((j+1)) done sleep 20 # Let the retries catch up + count=$(grep IndicationTime $ODIR/SFCB_Listener.txt | wc -l) -if [ $count -eq $lim ] +halfcount=`expr $count / 2` # 2 indication messages are sent for each indication (interop, interop2) + +if [ $halfcount -eq $lim ] then echo " received $count of $lim: PASSED" else diff --git a/test/TestProviders/tests/IndTest1CreateFilter.xml b/test/TestProviders/tests/IndTest1CreateFilter.xml index d8273d9..362bfd5 100644 --- a/test/TestProviders/tests/IndTest1CreateFilter.xml +++ b/test/TestProviders/tests/IndTest1CreateFilter.xml @@ -32,6 +32,12 @@ <PROPERTY NAME="SourceNamespace" TYPE="string"> <VALUE>root/interop</VALUE> </PROPERTY> + <PROPERTY.ARRAY NAME="SourceNamespaces" TYPE="string"> + <VALUE.ARRAY> + <VALUE>root/interop</VALUE> + <VALUE>root/interop2</VALUE> + </VALUE.ARRAY> + </PROPERTY.ARRAY> </INSTANCE> </IPARAMVALUE> </IMETHODCALL> diff --git a/test/schema/root/interop/Test_Indication.reg b/test/schema/root/interop/Test_Indication.reg index bc8d15e..40bf076 100644 --- a/test/schema/root/interop/Test_Indication.reg +++ b/test/schema/root/interop/Test_Indication.reg @@ -2,5 +2,5 @@ provider: TestIndicationProvider location: TestIndicationProvider type: indication method - namespace: root/interop + namespace: root/interop root/interop2 # diff --git a/test/schema/root/interop/Test_Indication.mof b/test/schema/root/interop2/Test_Indication.mof similarity index 100% copy from test/schema/root/interop/Test_Indication.mof copy to test/schema/root/interop2/Test_Indication.mof diff --git a/test/schema/root/interop/Test_Indication.reg b/test/schema/root/interop2/Test_Indication.reg similarity index 100% copy from test/schema/root/interop/Test_Indication.reg copy to test/schema/root/interop2/Test_Indication.reg diff --git a/test/stageschema.sh b/test/stageschema.sh index f675ee7..cb669ce 100755 --- a/test/stageschema.sh +++ b/test/stageschema.sh @@ -21,7 +21,7 @@ usage() echo "usage: $0 [-p prefix] [ -d testschemadir] [ -u ] " 1>&2 } -NAMESPACE_DIRS="root/cimv2 root/interop" +NAMESPACE_DIRS="root/cimv2 root/interop root/interop2" unstage=0 args=`getopt p:d:u $*` hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-07-05 23:04:49
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv11311 Modified Files: ChangeLog interopProvider.c NEWS sfcCustomLib.c support.c Log Message: [ 3538858 ] custom routine to log indInst objinfo Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.706 retrieving revision 1.707 diff -u -d -r1.706 -r1.707 --- NEWS 3 Jul 2012 02:11:19 -0000 1.706 +++ NEWS 5 Jul 2012 23:04:47 -0000 1.707 @@ -8,6 +8,7 @@ - 3539557 Memory leak in providerDrv with property list - 3539555 Memory leak in TestInstanceProvider - 1901737 Memory leak in internalProvider.c +- 3538858 custom routine to log indInst objinfo Changes in 1.3.15 ================= Index: support.c =================================================================== RCS file: /cvsroot/sblim/sfcb/support.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- support.c 13 Jun 2012 21:21:09 -0000 1.40 +++ support.c 5 Jul 2012 23:04:47 -0000 1.41 @@ -1026,9 +1026,11 @@ typedef int (*getSfcbHostname)(char *httpHost, char **hostname, unsigned int len); typedef int (*getSfcbSlpHostname)(char **hostname); +typedef void (*sfcbLog)(char *operation, char *objinfo); static void *hostnameLib; static getSfcbHostname sfcbHostname; static getSfcbSlpHostname sfcbSlpHostname; +static sfcbLog indAuditLog; int loadHostnameLib() { char *ln; @@ -1053,6 +1055,13 @@ dlclose(hostnameLib); return -1; } + dlerror(); + indAuditLog = dlsym(hostnameLib, "_sfcbIndAuditLog"); + if ((err = dlerror()) != NULL) { + printf("dlsym failed for _sfcbIndAuditLog: %s\n", err); + dlclose(hostnameLib); + return -1; + } } else { printf("dlopen failed for sfcbCustomLib\n"); @@ -1079,6 +1088,11 @@ return -1; } +void sfcbIndAuditLog(char *operation, char *objinfo) +{ + if (indAuditLog) return(indAuditLog(operation, objinfo)); + return; +} void unloadHostnameLib() { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.790 retrieving revision 1.791 diff -u -d -r1.790 -r1.791 --- ChangeLog 3 Jul 2012 02:11:19 -0000 1.790 +++ ChangeLog 5 Jul 2012 23:04:46 -0000 1.791 @@ -1,3 +1,8 @@ +2012-07-05 Narasimha Sharoff <nsh...@us...> + + * interopProvider.c, sfcCustomLib.c, support.c: + [ 3538858 ] custom routine to log indInst objinfo + 2012-07-02 Chris Buccella <buc...@li...> * internalProvider.c, providerMgr.c: Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- interopProvider.c 3 Jul 2012 01:57:48 -0000 1.65 +++ interopProvider.c 5 Jul 2012 23:04:47 -0000 1.66 @@ -1130,6 +1130,8 @@ if (st.rc==CMPI_RC_OK) { ctxLocal = prepareUpcall((CMPIContext *)ctx); CMReturnObjectPath(rslt, _broker->bft->createInstance(_broker, ctxLocal, copLocal, ciLocal, &st)); + sfcbIndAuditLog("CreateInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } @@ -1222,6 +1224,8 @@ if (st.rc==CMPI_RC_OK) { ctxLocal = prepareUpcall((CMPIContext *)ctx); st = _broker->bft->modifyInstance(_broker, ctxLocal, cop, ci, properties); + sfcbIndAuditLog("Subscription:ModifyInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } _SFCB_RETURN(st); @@ -1291,6 +1295,8 @@ if (st.rc==CMPI_RC_OK) { ctxLocal = prepareUpcall((CMPIContext *)ctx); st = _broker->bft->deleteInstance(_broker, ctxLocal, cop); + sfcbIndAuditLog("DeleteInstance-> ", + CMGetCharPtr(CMObjectPathToString(cop, NULL))); CMRelease(ctxLocal); } @@ -1455,6 +1461,8 @@ CMPIString *ns=CMGetNameSpace(op,NULL); _SFCB_TRACE(1,("--- _addHandler %s %s",(char*)ns->hdl,(char*)str->hdl)); addHandler(ci,op); + sfcbIndAuditLog("CreateHandler-> ", + CMGetCharPtr(CMObjectPathToString(op, NULL))); } else if (strcasecmp(methodName, "_removeHandler") == 0) { @@ -1467,6 +1475,8 @@ } else { removeHandler(ha,key); LDcount--; + sfcbIndAuditLog("RemoveHandler-> ", + CMGetCharPtr(CMObjectPathToString(op, NULL))); } } else { Index: sfcCustomLib.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcCustomLib.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sfcCustomLib.c 13 Jun 2012 21:21:09 -0000 1.1 +++ sfcCustomLib.c 5 Jul 2012 23:04:47 -0000 1.2 @@ -68,3 +68,27 @@ return 0; } + +/** \brief _sfcbIndAuditLog - log create, delete, and modify calls + * + * Provides object information for indicaiton create, delete, and modify + * Default action: return + * operation - create/delete/modify + * objinfo - information on the object +*/ +extern void _sfcbIndAuditLog(char *operation, char *objinfo) +{ + /* example - log to /tmp/indAudit.log + FILE *fp; + char *ts = ctime(&t); + fp = fopen("/tmp/indAudit.log", "a+"); + if (fp != NULL) { + fwrite(operation, strlen(action), 1, fp); + fwrite(objinfo, strlen(msg), 1, fp); + fwrite("\n\n",2,1,fp); + fflush(fp); + fclose(fp); + } + */ + return; +} |
From: Chris B. <buc...@us...> - 2012-07-03 02:11:21
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv9566 Modified Files: internalProvider.c providerMgr.c ChangeLog NEWS Log Message: [ 1901737 ] Memory leak in internalProvider.c Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.705 retrieving revision 1.706 diff -u -d -r1.705 -r1.706 --- NEWS 3 Jul 2012 02:05:01 -0000 1.705 +++ NEWS 3 Jul 2012 02:11:19 -0000 1.706 @@ -7,6 +7,7 @@ - 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled - 3539557 Memory leak in providerDrv with property list - 3539555 Memory leak in TestInstanceProvider +- 1901737 Memory leak in internalProvider.c Changes in 1.3.15 ================= Index: providerMgr.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerMgr.c,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- providerMgr.c 11 Apr 2012 22:55:17 -0000 1.82 +++ providerMgr.c 3 Jul 2012 02:11:19 -0000 1.83 @@ -575,6 +575,7 @@ for (child = children->ft->getFirst(children); child; child = children->ft->getNext(children)) { rc = addAssocProviders(child, nameSpace, providerList); + free(child); if (rc) _SFCB_RETURN(rc); } CMRelease(children); Index: internalProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/internalProvider.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- internalProvider.c 11 May 2012 20:05:11 -0000 1.44 +++ internalProvider.c 3 Jul 2012 02:11:18 -0000 1.45 @@ -590,6 +590,7 @@ CMPIObjectPath *path; if (assocForName(ns,assocClass,role,resultRole) == NULL) { /* for an unknown class we just return nothing */ + refs->ft->release(refs); _SFCB_RETURN(st); } path=CMNewObjectPath(_broker,ns,assocClass,NULL); @@ -675,6 +676,7 @@ // Use hashtable to avoid dup'd associators CMPIInstance *ci; UtilHashTable *assocs = UtilFactory->newHashTable(61,UtilHashTable_charKey); + assocs->ft->setReleaseFunctions(assocs, free, NULL); UtilStringBuffer *pn=normalizeObjectPathStrBuf(cop); for (ci=refs->ft->getFirst(refs); ci; ci=refs->ft->getNext(refs)) { // Q: for ASSOC_NAME we should not require the @@ -688,9 +690,10 @@ objectPathEquals(pn,data.value.ref,&an,0)==0) { if (resultClass ==NULL || CMClassPathIsA(Broker,data.value.ref,resultClass,NULL)) { CMPIInstance *aci=CBGetInstance(Broker,ctx,data.value.ref,propertyList,&st); - assocs->ft->put(assocs,an->ft->getCharPtr(an),aci); + assocs->ft->put(assocs, strdup(an->ft->getCharPtr(an)), aci); } } + an->ft->release(an); } else { @@ -707,8 +710,9 @@ if (resultClass==NULL || CMClassPathIsA(Broker,ref,resultClass,NULL)) { CMPIInstance *aci=CBGetInstance(Broker,ctx,ref,propertyList,&st); - if (aci) assocs->ft->put(assocs,an->ft->getCharPtr(an),aci); + if (aci) assocs->ft->put(assocs, strdup(an->ft->getCharPtr(an)), aci); } + an->ft->release(an); } } } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.789 retrieving revision 1.790 diff -u -d -r1.789 -r1.790 --- ChangeLog 3 Jul 2012 02:05:01 -0000 1.789 +++ ChangeLog 3 Jul 2012 02:11:19 -0000 1.790 @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * internalProvider.c, providerMgr.c: + [ 1901737 ] Memory leak in internalProvider.c + * test/TestProviders/cmpiTestInstanceProvider.c: [ 3539555 ] Memory leak in TestInstanceProvider |
From: Chris B. <buc...@us...> - 2012-07-03 02:05:03
|
Update of /cvsroot/sblim/sfcb/test/TestProviders In directory vz-cvs-3.sog:/tmp/cvs-serv7813/test/TestProviders Modified Files: cmpiTestInstanceProvider.c Log Message: [ 3539555 ] Memory leak in TestInstanceProvider Index: cmpiTestInstanceProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/test/TestProviders/cmpiTestInstanceProvider.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cmpiTestInstanceProvider.c 29 Sep 2011 19:56:38 -0000 1.6 +++ cmpiTestInstanceProvider.c 3 Jul 2012 02:05:00 -0000 1.7 @@ -374,6 +374,7 @@ /* return object-path of instance */ CMReturnObjectPath(rslt, cop); CMReturnDone(rslt); + CMRelease(inst); } else { |
From: Chris B. <buc...@us...> - 2012-07-03 02:03:05
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv7511 Modified Files: providerDrv.c ChangeLog NEWS Log Message: [ 3539557 ] Memory leak in providerDrv with property list Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.703 retrieving revision 1.704 diff -u -d -r1.703 -r1.704 --- NEWS 3 Jul 2012 02:00:22 -0000 1.703 +++ NEWS 3 Jul 2012 02:03:03 -0000 1.704 @@ -5,6 +5,7 @@ Bugs fixed: - 3539569 Leaks in interopProvider - 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled +- 3539557 Memory leak in providerDrv with property list Changes in 1.3.15 ================= Index: providerDrv.c =================================================================== RCS file: /cvsroot/sblim/sfcb/providerDrv.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- providerDrv.c 21 Jun 2012 16:48:49 -0000 1.117 +++ providerDrv.c 3 Jul 2012 02:03:02 -0000 1.118 @@ -1930,12 +1930,13 @@ TIMING_STOP(hdr,info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) free(props); + if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result,abs(requestor),1); return NULL; } else resp = errorResp(&rci); - if (props) free(props); _SFCB_RETURN(resp); } @@ -2162,12 +2163,13 @@ TIMING_STOP(hdr,info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) free(props); + if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result,abs(requestor),1); return NULL; } else resp = errorResp(&rci); - if (props) free(props); _SFCB_RETURN(resp); } @@ -2205,12 +2207,13 @@ TIMING_STOP(hdr,info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) free(props); + if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result,abs(requestor),1); return NULL; } else resp = errorResp(&rci); - if (props) free(props); _SFCB_RETURN(resp); } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.787 retrieving revision 1.788 diff -u -d -r1.787 -r1.788 --- ChangeLog 3 Jul 2012 02:00:22 -0000 1.787 +++ ChangeLog 3 Jul 2012 02:03:02 -0000 1.788 @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * providerDrv.c: + [ 3539557 ] Memory leak in providerDrv with property list + * indCIMXMLHandler.c: [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled |
From: Chris B. <buc...@us...> - 2012-07-03 02:00:24
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5384 Modified Files: indCIMXMLHandler.c ChangeLog NEWS Log Message: [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.702 retrieving revision 1.703 diff -u -d -r1.702 -r1.703 --- NEWS 3 Jul 2012 01:57:48 -0000 1.702 +++ NEWS 3 Jul 2012 02:00:22 -0000 1.703 @@ -4,6 +4,7 @@ Bugs fixed: - 3539569 Leaks in interopProvider +- 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled Changes in 1.3.15 ================= Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- indCIMXMLHandler.c 23 May 2012 21:58:55 -0000 1.54 +++ indCIMXMLHandler.c 3 Jul 2012 02:00:22 -0000 1.55 @@ -1003,10 +1003,12 @@ CMPIContext * pctx = native_clone_CMPIContext(ctx); pthread_create(&t, &tattr,&retryExport,(void *) pctx); } - CMRelease(ctxLocal); } break; } + if (RIEnabled) { + CMRelease(ctxLocal); + } CMRelease(ind); } else { Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.786 retrieving revision 1.787 diff -u -d -r1.786 -r1.787 --- ChangeLog 3 Jul 2012 01:57:48 -0000 1.786 +++ ChangeLog 3 Jul 2012 02:00:22 -0000 1.787 @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * indCIMXMLHandler.c: + [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled + * interopProvider.c: [ 3539569 ] Leaks in interopProvider |
From: Chris B. <buc...@us...> - 2012-07-03 01:57:52
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5305 Modified Files: interopProvider.c ChangeLog NEWS Log Message: [ 3539569 ] Leaks in interopProvider Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.701 retrieving revision 1.702 diff -u -d -r1.701 -r1.702 --- NEWS 29 Jun 2012 00:45:22 -0000 1.701 +++ NEWS 3 Jul 2012 01:57:48 -0000 1.702 @@ -1,3 +1,10 @@ +Changes in 1.3.16 +================= + + +Bugs fixed: +- 3539569 Leaks in interopProvider + Changes in 1.3.15 ================= Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- interopProvider.c 21 Jun 2012 17:58:13 -0000 1.64 +++ interopProvider.c 3 Jul 2012 01:57:48 -0000 1.65 @@ -379,6 +379,7 @@ CMRelease(ha->hci); ha->hci=CMClone(ci,NULL); + CMRelease(ha->hop); ha->hop=CMClone(op,NULL); handlerHt->ft->put(handlerHt,key,ha); @@ -639,6 +640,8 @@ if (fi == NULL) { _SFCB_TRACE(1,("--- cannot find specified subscription filter")); setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Filter not found"); + if (skey) + free(skey); _SFCB_RETURN(st); } @@ -658,6 +661,8 @@ if (ha == NULL) { _SFCB_TRACE(1,("--- cannot find specified subscription handler")); setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Handler not found"); + if (skey) + free(skey); _SFCB_RETURN(st); } @@ -675,6 +680,8 @@ getControlNum("MaxActiveSubscriptions", &cfgmax); if (AScount+1 > cfgmax) { setStatus(&st,CMPI_RC_ERR_FAILED,"Subscription activation would exceed MaxActiveSubscription limit"); + if (skey) + free(skey); return st; } AScount++; Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.785 retrieving revision 1.786 diff -u -d -r1.785 -r1.786 --- ChangeLog 29 Jun 2012 00:45:22 -0000 1.785 +++ ChangeLog 3 Jul 2012 01:57:48 -0000 1.786 @@ -1,3 +1,8 @@ +2012-07-02 Chris Buccella <buc...@li...> + + * interopProvider.c: + [ 3539569 ] Leaks in interopProvider + 2012-06-28 Narasimha Sharoff <nsh...@us...> * cimslpCMPI.c: [ 3538848 ] compile error in cimslpCMPI.c:291 |
From: Chris B. <buc...@us...> - 2012-07-03 01:50:07
|
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 7bba0e8f89428f68feff87567c616de2f8b102a8 (commit) from 3e43d478b9bb3d50cc12454f5661f40b0c14438f (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 7bba0e8f89428f68feff87567c616de2f8b102a8 Author: buccella <buc...@li...> Date: Mon Jul 2 21:50:26 2012 -0400 [ 3539569 ] Leaks in interopProvider ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 1523d72..6987bcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * interopProvider.c: + [ 3539569 ] Leaks in interopProvider + * indCIMXMLHandler.c: [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled diff --git a/NEWS b/NEWS index 1c7fdcd..75e373b 100644 --- a/NEWS +++ b/NEWS @@ -102,6 +102,7 @@ Bugs fixed: - 3539555 Memory leak in TestInstanceProvider - 3539557 Memory leak in providerDrv with property list - 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled +- 3539569 Leaks in interopProvider Changes in 1.3.15 ================= diff --git a/interopProvider.c b/interopProvider.c index a7e8e7d..00afaa9 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -435,6 +435,7 @@ static Handler *updateHandler(CMPIInstance *ci, CMRelease(ha->hci); ha->hci=CMClone(ci,NULL); + CMRelease(ha->hop); ha->hop=CMClone(op,NULL); handlerHt->ft->put(handlerHt,key,ha); @@ -735,6 +736,8 @@ processSubscription(const CMPIBroker * broker, if (fi == NULL) { _SFCB_TRACE(1, ("--- cannot find specified subscription filter")); setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Filter not found"); + if (skey) + free(skey); _SFCB_RETURN(st); } @@ -754,6 +757,8 @@ processSubscription(const CMPIBroker * broker, if (ha == NULL) { _SFCB_TRACE(1, ("--- cannot find specified subscription handler")); setStatus(&st, CMPI_RC_ERR_NOT_FOUND, "Handler not found"); + if (skey) + free(skey); _SFCB_RETURN(st); } // Get current state @@ -770,6 +775,8 @@ processSubscription(const CMPIBroker * broker, getControlNum("MaxActiveSubscriptions", &cfgmax); if (AScount+1 > cfgmax) { setStatus(&st,CMPI_RC_ERR_FAILED,"Subscription activation would exceed MaxActiveSubscription limit"); + if (skey) + free(skey); return st; } AScount++; hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-07-02 22:01:59
|
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 3e43d478b9bb3d50cc12454f5661f40b0c14438f (commit) from f42a2cc20966b857f9cd2343ac11eb8292421620 (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 3e43d478b9bb3d50cc12454f5661f40b0c14438f Author: buccella <buc...@li...> Date: Mon Jul 2 18:02:28 2012 -0400 [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ec302d4..1523d72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * indCIMXMLHandler.c: + [ 3539563 ] Memory leak in indCIMXMLHandler when Reliable Inds Enabled + * providerDrv.c: [ 3539557 ] Memory leak in providerDrv with property list diff --git a/NEWS b/NEWS index e64d99d..1c7fdcd 100644 --- a/NEWS +++ b/NEWS @@ -101,6 +101,7 @@ Bugs fixed: - 1901737 Memory leak in internalProvider.c - 3539555 Memory leak in TestInstanceProvider - 3539557 Memory leak in providerDrv with property list +- 3539563 Memory leak in indCIMXMLHandler when Reliable Inds Enabled Changes in 1.3.15 ================= diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index fc82735..fc2899d 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -1097,10 +1097,12 @@ IndCIMXMLHandlerInvokeMethod(CMPIMethodMI * mi, CMPIContext *pctx = native_clone_CMPIContext(ctx); pthread_create(&t, &tattr, &retryExport, (void *) pctx); } - CMRelease(ctxLocal); } break; } + if (RIEnabled) { + CMRelease(ctxLocal); + } CMRelease(ind); } else { hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-07-02 21:40:11
|
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 f42a2cc20966b857f9cd2343ac11eb8292421620 (commit) from 716f6c8193b1a4642748f47b0079182413a115b0 (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 f42a2cc20966b857f9cd2343ac11eb8292421620 Author: buccella <buc...@li...> Date: Mon Jul 2 17:40:33 2012 -0400 [ 3539557 ] Memory leak in providerDrv with property list ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 3966d88..ec302d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2012-07-02 Chris Buccella <buc...@li...> + * providerDrv.c: + [ 3539557 ] Memory leak in providerDrv with property list + * test/TestProviders/cmpiTestInstanceProvider.c: [ 3539555 ] Memory leak in TestInstanceProvider diff --git a/NEWS b/NEWS index 7c2a112..e64d99d 100644 --- a/NEWS +++ b/NEWS @@ -100,6 +100,7 @@ Bugs fixed: - 3539006 Possible indication deadlock - 1901737 Memory leak in internalProvider.c - 3539555 Memory leak in TestInstanceProvider +- 3539557 Memory leak in providerDrv with property list Changes in 1.3.15 ================= diff --git a/providerDrv.c b/providerDrv.c index 4aee4f9..596f14d 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -2234,13 +2234,13 @@ enumInstances(BinRequestHdr * hdr, ProviderInfo * info, int requestor) TIMING_STOP(hdr, info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) + free(props); if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result, abs(requestor), 1); return NULL; } else resp = errorResp(&rci); - if (props) - free(props); _SFCB_RETURN(resp); } @@ -2510,13 +2510,13 @@ associators(BinRequestHdr * hdr, ProviderInfo * info, int requestor) TIMING_STOP(hdr, info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) + free(props); if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result, abs(requestor), 1); return NULL; } else resp = errorResp(&rci); - if (props) - free(props); _SFCB_RETURN(resp); } @@ -2564,13 +2564,13 @@ references(BinRequestHdr * hdr, ProviderInfo * info, int requestor) TIMING_STOP(hdr, info) _SFCB_TRACE(1, ("--- Back from provider rc: %d", rci.rc)); + if (props) + free(props); if (rci.rc == CMPI_RC_OK) { xferLastResultBuffer(result, abs(requestor), 1); return NULL; } else resp = errorResp(&rci); - if (props) - free(props); _SFCB_RETURN(resp); } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-07-02 21:26:14
|
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 716f6c8193b1a4642748f47b0079182413a115b0 (commit) via 8b2d3a90b55ca6ad905ff542bce1bb78dc138898 (commit) from 2fcf9c2ef882d9e5ef6a152ac5169b60b68154aa (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 716f6c8193b1a4642748f47b0079182413a115b0 Author: buccella <buc...@li...> Date: Mon Jul 2 17:26:31 2012 -0400 [ 3539555 ] Memory leak in TestInstanceProvider commit 8b2d3a90b55ca6ad905ff542bce1bb78dc138898 Author: buccella <buc...@li...> Date: Mon Jul 2 17:23:25 2012 -0400 [ 1901737 ] Memory leak in internalProvider.c ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ff68cb8..3966d88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-07-02 Chris Buccella <buc...@li...> + + * test/TestProviders/cmpiTestInstanceProvider.c: + [ 3539555 ] Memory leak in TestInstanceProvider + + * internalProvider.c, providerMgr.c: + [ 1901737 ] Memory leak in internalProvider.c + 2012-06-29 Michael Chase-Salerno <br...@li...> * brokerUpc.c, indCIMXMLExport.c, indCIMXMLHandler.c, interopProvider.c, diff --git a/NEWS b/NEWS index 6acf4fc..7c2a112 100644 --- a/NEWS +++ b/NEWS @@ -98,6 +98,8 @@ Changes in 1.3.16 Bugs fixed: - 3539006 Possible indication deadlock +- 1901737 Memory leak in internalProvider.c +- 3539555 Memory leak in TestInstanceProvider Changes in 1.3.15 ================= diff --git a/test/TestProviders/cmpiTestInstanceProvider.c b/test/TestProviders/cmpiTestInstanceProvider.c index f190bf3..a974de3 100644 --- a/test/TestProviders/cmpiTestInstanceProvider.c +++ b/test/TestProviders/cmpiTestInstanceProvider.c @@ -407,6 +407,7 @@ TestInstanceProviderCreateInstance(CMPIInstanceMI * mi, */ CMReturnObjectPath(rslt, cop); CMReturnDone(rslt); + CMRelease(inst); } else { CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Chris B. <buc...@us...> - 2012-07-02 21:08:39
|
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 2fcf9c2ef882d9e5ef6a152ac5169b60b68154aa (commit) from f2b9c05c7b13844039009806325e536b50264385 (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 2fcf9c2ef882d9e5ef6a152ac5169b60b68154aa Author: buccella <buc...@li...> Date: Mon Jul 2 16:28:39 2012 -0400 [ 1901737 ] Memory leak in internalProvider.c ----------------------------------------------------------------------- Summary of changes: diff --git a/internalProvider.c b/internalProvider.c index c330ceb..71c68ec 100644 --- a/internalProvider.c +++ b/internalProvider.c @@ -636,6 +636,7 @@ getRefs(const CMPIContext *ctx, const CMPIResult *rslt, /* * for an unknown class we just return nothing */ + refs->ft->release(refs); _SFCB_RETURN(st); } path = CMNewObjectPath(_broker, ns, assocClass, NULL); @@ -731,6 +732,7 @@ getRefs(const CMPIContext *ctx, const CMPIResult *rslt, CMPIInstance *ci; UtilHashTable *assocs = UtilFactory->newHashTable(61, UtilHashTable_charKey); + assocs->ft->setReleaseFunctions(assocs, free, NULL); UtilStringBuffer *pn = normalizeObjectPathStrBuf(cop); for (ci = refs->ft->getFirst(refs); ci; ci = refs->ft->getNext(refs)) { // Q: for ASSOC_NAME we should not require the @@ -748,8 +750,9 @@ getRefs(const CMPIContext *ctx, const CMPIResult *rslt, CMPIInstance *aci = CBGetInstance(Broker, ctx, data.value.ref, propertyList, &st); - assocs->ft->put(assocs, an->ft->getCharPtr(an), aci); + assocs->ft->put(assocs, strdup(an->ft->getCharPtr(an)), aci); } + an->ft->release(an); } } @@ -764,7 +767,7 @@ getRefs(const CMPIContext *ctx, const CMPIResult *rslt, CMPIString *tns = CMGetNameSpace(ref, NULL); if (tns == NULL || tns->hdl == NULL) CMSetNameSpace(ref, ns); - UtilStringBuffer *an = NULL; + UtilStringBuffer *an = NULL; /* alloc'd in objectPathEquals() */ if (objectPathEquals(pn, ref, &an, 0) == 0) { if (resultClass == NULL @@ -772,8 +775,9 @@ getRefs(const CMPIContext *ctx, const CMPIResult *rslt, CMPIInstance *aci = CBGetInstance(Broker, ctx, ref, propertyList, &st); if (aci) - assocs->ft->put(assocs, an->ft->getCharPtr(an), aci); + assocs->ft->put(assocs, strdup(an->ft->getCharPtr(an)), aci); } + an->ft->release(an); } } } diff --git a/providerMgr.c b/providerMgr.c index a7d47d5..8185025 100644 --- a/providerMgr.c +++ b/providerMgr.c @@ -363,7 +363,7 @@ lookupProviders(long type, char *className, char *nameSpace, lst = (*ht)->ft->get(*ht, id); if (lst == NULL) { - lst = UtilFactory->newList(memAddUtilList, memUnlinkEncObj); + lst = UtilFactory->newList(NULL, NULL); if ((rc = addProviders(type, className, nameSpace, lst))) { lst->ft->release(lst); free(id); @@ -618,6 +618,7 @@ addAssocProviders(char *className, char *nameSpace, for (child = children->ft->getFirst(children); child; child = children->ft->getNext(children)) { rc = addAssocProviders(child, nameSpace, providerList); + free(child); //added from addProviders() if (rc) _SFCB_RETURN(rc); } @@ -649,7 +650,7 @@ getAssocProviders(char *className, char *nameSpace) lst = assocProvidersHt->ft->get(assocProvidersHt, key); } if (lst == NULL) { - lst = UtilFactory->newList(memAddUtilList, memUnlinkEncObj); + lst = UtilFactory->newList(NULL, NULL); if (addAssocProviders(className, nameSpace, lst)) { lst->ft->release(lst); _SFCB_RETURN(NULL); @@ -1830,7 +1831,7 @@ _getConstClassChildren(const char *ns, const char *cn) localInvokeMethod(&binCtx, path, "getchildren", in, &out, &rc, 0); if (out) { ar = CMGetArg(out, "children", &rc).value.array; - ul = UtilFactory->newList(memAddUtilList, memUnlinkEncObj); + ul = UtilFactory->newList(NULL, NULL); for (i = 0, m = CMGetArrayCount(ar, NULL); i < m; i++) { str = CMGetArrayElementAt(ar, i, NULL).value.string; if (str && str->hdl) @@ -1848,6 +1849,7 @@ _getConstClassChildren(const char *ns, const char *cn) _SFCB_RETURN(ul); } +/* basically this is _getConstClassChildren for assoc classes */ static UtilList * _getAssocClassNames(const char *ns) { @@ -1865,8 +1867,9 @@ _getAssocClassNames(const char *ns) int i, m, irc; + CMPIString *str; - _SFCB_TRACE(1, ("--- for %s", ns)); + _SFCB_TRACE(1, ("--- _getAssocClassNames for %s", ns)); path = NewCMPIObjectPath(ns, "$ClassProvider$", &rc); req.nameSpace = setCharsMsgSegment((char *) ns); req.className = setCharsMsgSegment("$ClassProvider$"); @@ -1878,13 +1881,12 @@ _getAssocClassNames(const char *ns) data = localInvokeMethod(&binCtx, path, "getassocs", in, &out, &rc, 0); if (out) { ar = CMGetArg(out, "assocs", &rc).value.array; - ul = UtilFactory->newList(memAddUtilList, memUnlinkEncObj); + ul = UtilFactory->newList(NULL, NULL); for (i = 0, m = CMGetArrayCount(ar, NULL); i < m; i++) { - char *name = - CMGetArrayElementAt(ar, i, NULL).value.string->hdl; - if (name) - ul->ft->append(ul, name); - _SFCB_TRACE(1, ("--- assoc %s", name)); + str = CMGetArrayElementAt(ar, i, NULL).value.string; + if (str && str->hdl) + ul->ft->append(ul, strdup(str->hdl)); + _SFCB_TRACE(1, ("--- assoc %s", str->hdl)); } } } hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Michael Chase-S. <mc...@us...> - 2012-06-29 16:18:58
|
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 f2b9c05c7b13844039009806325e536b50264385 (commit) from c82bc87d88c184684a25b6b2e340c44f7a06b98b (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 f2b9c05c7b13844039009806325e536b50264385 Author: Michael Chase-Salerno <br...@li...> Date: Fri Jun 29 12:18:10 2012 -0400 [ 3539006 ] Possible indication deadlock ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index ccb166f..ff68cb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-29 Michael Chase-Salerno <br...@li...> + + * brokerUpc.c, indCIMXMLExport.c, indCIMXMLHandler.c, interopProvider.c, + support.c, support.h: + + [ 3539006 ] Possible indication deadlock + 2012-06-28 Narasimha Sharoff <nsh...@us...> * cimslpCMPI.c: [ 3538848 ] compile error in cimslpCMPI.c:291 diff --git a/NEWS b/NEWS index 26d8299..6acf4fc 100644 --- a/NEWS +++ b/NEWS @@ -92,6 +92,13 @@ Everything in 1.3.10, plus: - 3104761 cimRsRequest.h missing from make-dist tarball - 3107553 Remove Large Volume Support +Changes in 1.3.16 +================= + +Bugs fixed: + +- 3539006 Possible indication deadlock + Changes in 1.3.15 ================= diff --git a/brokerUpc.c b/brokerUpc.c index 1abe89f..6e5fba1 100644 --- a/brokerUpc.c +++ b/brokerUpc.c @@ -266,6 +266,10 @@ setContext(BinRequestContext * binCtx, OperationHdr * oHdr, bHdr->sessionId = ctx->ft->getEntry(ctx, "CMPISessionId", NULL).value.uint32; + ctxData = ctx->ft->getEntry(ctx, "noResp", NULL); + binCtx->noResp = (ctxData.state == CMPI_nullValue) ? 0 : ctxData.value.boolean; + + binCtx->oHdr = oHdr; binCtx->bHdr = bHdr; binCtx->bHdrSize = size; @@ -862,7 +866,7 @@ deleteInstance(const CMPIBroker * broker, const CMPIContext *context, const CMPIObjectPath * cop) { BinRequestContext binCtx; - BinResponseHdr *resp; + BinResponseHdr *resp = NULL; DeleteInstanceReq sreq = BINREQ(OPS_DeleteInstance, DI_REQ_REG_SEGMENTS); OperationHdr oHdr = { OPS_DeleteInstance, 2 }; CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -911,9 +915,11 @@ deleteInstance(const CMPIBroker * broker, resp = invokeProvider(&binCtx); closeProviderContext(&binCtx); - resp->rc--; - buildStatus(resp, &st); - free(resp); + if (resp) { + resp->rc--; + buildStatus(resp, &st); + free(resp); + } } else st = setErrorStatus(irc); diff --git a/indCIMXMLExport.c b/indCIMXMLExport.c index 159a77c..c260477 100644 --- a/indCIMXMLExport.c +++ b/indCIMXMLExport.c @@ -259,6 +259,8 @@ genRequest(CurlData * cd, char *url, char **msg) // Fail if we receive an error (HTTP response code >= 300) rv = curl_easy_setopt(cd->mHandle, CURLOPT_FAILONERROR, 1); + rv = curl_easy_setopt(cd->mHandle, CURLOPT_NOSIGNAL, 1); + // Turn this on to enable debugging // rv = curl_easy_setopt(cd->mHandle, CURLOPT_VERBOSE, 1); diff --git a/indCIMXMLHandler.c b/indCIMXMLHandler.c index 2250118..fc82735 100644 --- a/indCIMXMLHandler.c +++ b/indCIMXMLHandler.c @@ -35,6 +35,7 @@ #include "native.h" #include "control.h" #include "instance.h" +#include "support.h" extern void closeProviderContext(BinRequestContext * ctx); extern int exportIndication(char *url, char *payload, char **resp, @@ -881,7 +882,8 @@ retryExport(void *lctx) // 2, delete the sub; 3, disable the sub; otherwise, nothing if (ract == 2) { _SFCB_TRACE(1,("--- Subscription threshold reached, deleting.")); - CBDeleteInstance(_broker, ctx, cur->sub); + CMPIContext *ctxDel = prepareNorespCtx(ctx); + CBDeleteInstance(_broker, ctxDel, cur->sub); purge = cur; cur = cur->next; dqRetry(ctx,purge); diff --git a/interopProvider.c b/interopProvider.c index d5ee835..a7e8e7d 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -94,6 +94,12 @@ static UtilHashTable *filterHt = NULL; static UtilHashTable *handlerHt = NULL; static UtilHashTable *subscriptionHt = NULL; +// Mutex's to protect the hash tables +static pthread_mutex_t filterHTlock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t handlerHTlock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t subHTlock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t subDelLock = PTHREAD_MUTEX_INITIALIZER; + /* for indication delivery */ static long MAX_IND_THREADS; static long IND_THREAD_TO; @@ -155,6 +161,7 @@ addSubscription(const CMPIInstance *ci, _SFCB_ENTER(TRACE_INDPROVIDER, "addSubscription"); + pthread_mutex_lock(&subHTlock); if (subscriptionHt == NULL) { subscriptionHt = UtilFactory->newHashTable(61, UtilHashTable_charKey); subscriptionHt->ft->setReleaseFunctions(subscriptionHt, free, NULL); @@ -163,9 +170,10 @@ addSubscription(const CMPIInstance *ci, _SFCB_TRACE(1, ("-- Subscription: %s\n", key)); su = subscriptionHt->ft->get(subscriptionHt, key); - if (su) + if (su) { + pthread_mutex_unlock(&subHTlock); _SFCB_RETURN(NULL); - + } su = (Subscription *) malloc(sizeof(Subscription)); su->sci = CMClone(ci, NULL); su->fi = fi; @@ -174,6 +182,7 @@ addSubscription(const CMPIInstance *ci, ha->useCount++; subscriptionHt->ft->put(subscriptionHt, key, su); + pthread_mutex_unlock(&subHTlock); _SFCB_RETURN(su); } @@ -204,6 +213,7 @@ removeSubscription(Subscription * su, char *key) { _SFCB_ENTER(TRACE_INDPROVIDER, "removeSubscription"); + pthread_mutex_lock(&subHTlock); if (subscriptionHt) { subscriptionHt->ft->remove(subscriptionHt, key); if (su) { @@ -214,10 +224,13 @@ removeSubscription(Subscription * su, char *key) } } if (su) { - CMRelease(su->sci); + if (su->sci) { + CMRelease(su->sci); + } free(su); } + pthread_mutex_unlock(&subHTlock); _SFCB_EXIT(); } @@ -239,14 +252,17 @@ addFilter(const CMPIInstance *ci, _SFCB_TRACE(1, ("--- Filter: >%s<", key)); _SFCB_TRACE(1, ("--- query: >%s<", query)); + pthread_mutex_lock(&filterHTlock); if (filterHt == NULL) { filterHt = UtilFactory->newHashTable(61, UtilHashTable_charKey); filterHt->ft->setReleaseFunctions(filterHt, free, NULL); } fi = filterHt->ft->get(filterHt, key); - if (fi) + if (fi) { + pthread_mutex_unlock(&filterHTlock); _SFCB_RETURN(NULL); + } fi = (Filter *) malloc(sizeof(Filter)); fi->fci = CMClone(ci, NULL); @@ -259,6 +275,7 @@ addFilter(const CMPIInstance *ci, else fi->snsa = NULL; fi->type = NULL; filterHt->ft->put(filterHt, key, fi); + pthread_mutex_unlock(&filterHTlock); _SFCB_RETURN(fi); } @@ -290,6 +307,7 @@ removeFilter(Filter * fi, char *key) { _SFCB_ENTER(TRACE_INDPROVIDER, "removeFilter"); + pthread_mutex_lock(&filterHTlock); if (filterHt) { filterHt->ft->remove(filterHt, key); } @@ -303,6 +321,7 @@ removeFilter(Filter * fi, char *key) free(fi); } + pthread_mutex_unlock(&filterHTlock); _SFCB_EXIT(); } @@ -318,6 +337,7 @@ addHandler(CMPIInstance *ci, CMPIObjectPath * op) _SFCB_ENTER(TRACE_INDPROVIDER, "addHandler"); + pthread_mutex_lock(&handlerHTlock); if (handlerHt == NULL) { handlerHt = UtilFactory->newHashTable(61, UtilHashTable_charKey); handlerHt->ft->setReleaseFunctions(handlerHt, free, NULL); @@ -331,6 +351,7 @@ addHandler(CMPIInstance *ci, CMPIObjectPath * op) _SFCB_TRACE(1, ("--- Handler already registered %p", ha)); if (key) free(key); + pthread_mutex_unlock(&handlerHTlock); _SFCB_RETURN(NULL); } @@ -340,6 +361,7 @@ addHandler(CMPIInstance *ci, CMPIObjectPath * op) ha->useCount = 0; handlerHt->ft->put(handlerHt, key, ha); + pthread_mutex_unlock(&handlerHTlock); _SFCB_RETURN(ha); } @@ -370,6 +392,7 @@ removeHandler(Handler * ha, char *key) { _SFCB_ENTER(TRACE_INDPROVIDER, "removeHandler"); + pthread_mutex_lock(&handlerHTlock); if (handlerHt) { handlerHt->ft->remove(handlerHt, key); } @@ -379,10 +402,10 @@ removeHandler(Handler * ha, char *key) free(ha); } + pthread_mutex_unlock(&handlerHTlock); _SFCB_EXIT(); } - /* * Similar to addHandler(), but useCount is maintained * don't need to check for handlerHt because we only get here @@ -401,10 +424,12 @@ static Handler *updateHandler(CMPIInstance *ci, _SFCB_TRACE(1,("--- Handler: %s",key)); + pthread_mutex_lock(&handlerHTlock); // do we need to check?? if ((ha=handlerHt->ft->get(handlerHt,key))==NULL) { _SFCB_TRACE(1,("--- No handler %p",ha)); if(key) free( |
From: Narasimha S. <nsh...@us...> - 2012-06-29 00:54:12
|
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 c82bc87d88c184684a25b6b2e340c44f7a06b98b (commit) from a09ce1cd98a5b61cc7248ee01949967547df6fd1 (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 c82bc87d88c184684a25b6b2e340c44f7a06b98b Author: Narasimha Sharoff <nsh...@us...> Date: Thu Jun 28 17:53:17 2012 -0700 [ 3538848 ] compile error in cimslpCMPI.c:291 ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 8c46c72..ccb166f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-06-28 Narasimha Sharoff <nsh...@us...> + * cimslpCMPI.c: + [ 3538848 ] compile error in cimslpCMPI.c:291 + 2012-06-26 Narasimha Sharoff <nsh...@us...> * cimcClientSfcbLocal.c, cimXmlRequest.c, interopProvider.c, diff --git a/NEWS b/NEWS index 236050c..26d8299 100644 --- a/NEWS +++ b/NEWS @@ -118,6 +118,7 @@ Bugs Fixed: - 3532951 Filter creation fails with disable default properties - 3533179 Double definition for union semun in FreeBSD - 3535313 xmlUnescape may access memory beyond its buffer +- 3538848 compile error in cimslpCMPI.c:291 Changes in 1.3.14 ================= diff --git a/cimslpCMPI.c b/cimslpCMPI.c index ad16cf0..64b5e63 100644 --- a/cimslpCMPI.c +++ b/cimslpCMPI.c @@ -270,7 +270,7 @@ getSLPData(cimomConfig cfg, const CMPIBroker *_broker, sn = myGetProperty(ci[0], "SystemName"); #ifdef SLP_HOSTNAME_LIB - getCustomSlpHostname(char **sn); + getCustomSlpHostname(&sn); #endif rs.url_syntax = getUrlSyntax(sn, cfg.commScheme, cfg.port); rs.service_hi_name = myGetProperty(ci[0], "ElementName"); hooks/post-receive -- SFCB - Small Footprint CIM Broker |
From: Narasimha S. <nsh...@us...> - 2012-06-29 00:45:25
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv14056 Modified Files: cimslpCMPI.c ChangeLog NEWS Log Message: [ 3538848 ] compile error in cimslpCMPI.c:291 Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.700 retrieving revision 1.701 diff -u -d -r1.700 -r1.701 --- NEWS 21 Jun 2012 16:51:08 -0000 1.700 +++ NEWS 29 Jun 2012 00:45:22 -0000 1.701 @@ -30,6 +30,7 @@ - 3533179 Double definition for union semun in FreeBSD - 3535313 xmlUnescape may access memory beyond its buffer - 3520694 compile errors in cimAccountPassthroughProvider.c +- 3538848 compile error in cimslpCMPI.c:291 Changes in 1.3.14 ================= Index: cimslpCMPI.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimslpCMPI.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- cimslpCMPI.c 14 Jun 2012 02:09:43 -0000 1.20 +++ cimslpCMPI.c 29 Jun 2012 00:45:22 -0000 1.21 @@ -288,7 +288,7 @@ sn = myGetProperty(ci[0], "SystemName"); #ifdef SLP_HOSTNAME_LIB - getCustomSlpHostname(char **sn); + getCustomSlpHostname(&sn); #endif rs.url_syntax = getUrlSyntax(sn, cfg.commScheme, cfg.port); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.784 retrieving revision 1.785 diff -u -d -r1.784 -r1.785 --- ChangeLog 21 Jun 2012 16:51:08 -0000 1.784 +++ ChangeLog 29 Jun 2012 00:45:22 -0000 1.785 @@ -1,3 +1,7 @@ +2012-06-28 Narasimha Sharoff <nsh...@us...> + * cimslpCMPI.c: + [ 3538848 ] compile error in cimslpCMPI.c:291 + 2012-06-21 Narasimha Sharoff <nsh...@us...> * cimcClientSfcbLocal.c, cimXmlRequest.c, interopProvider.c, |
From: Tyrel D. <ty...@us...> - 2012-06-27 00:22:02
|
Update of /cvsroot/sblim/wbemcli In directory vz-cvs-3.sog:/tmp/cvs-serv11947 Modified Files: CimXml.cpp NEWS Log Message: Fixed 3495602: Fix for ID 3202420 (CDATA escape) breaks cim clients (patch by Klaus Kämpf) Index: NEWS =================================================================== RCS file: /cvsroot/sblim/wbemcli/NEWS,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- NEWS 18 Apr 2012 04:52:16 -0000 1.43 +++ NEWS 27 Jun 2012 00:22:00 -0000 1.44 @@ -1,9 +1,15 @@ -Changes in Version 1.6.2 +Changes in Version 1.6.3 ======================== Bugs: - 3519016 wbemcli does not support EmbeddedObject attr of PARAMVALUE - 3514126 wbemcli does not compile with GCC 4.7 +- 3495602 Fix for ID 3202420 (CDATA escape) breaks cim clients + +Changes in Version 1.6.2 +======================== + +Bugs: - 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: CimXml.cpp =================================================================== RCS file: /cvsroot/sblim/wbemcli/CimXml.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- CimXml.cpp 18 Apr 2012 04:52:16 -0000 1.72 +++ CimXml.cpp 27 Jun 2012 00:22:00 -0000 1.73 @@ -328,7 +328,19 @@ #endif char *start=cur; if (a && a->eTagFound) return NULL; - for (; *cur!='<' && cur<last; cur++); + for (; cur<last; cur++) { + if (*cur == '<') { + if (!strncmp(cur, "<![CDATA[", 9)) { + cur += 9; + char *end = strstr(cur, "]]>"); + if (end == NULL) + throw ParseException("Failed to get CDATA end tag."); + cur = end + 2; /* loop increments cur once more */ + } + else + break; + } + } if (start==cur) return ""; memmove(start-2,start,cur-start); *(cur-2)=0; @@ -2753,25 +2765,7 @@ } } - else { - if (!strncmp(xb.cur, "<![CDATA[", 8)) { - char *start = xb.cur; - char *end = strstr(start, "]]>"); - char *cdataval; - - if (end == NULL) - throw ParseException("Failed to get CDATA end tag."); - - start += 9; // skip CDATA begin tag - end--; // skip CDATA end tag - cdataval = strndup(start, ((end - start) + 1)); - val=string(cdataval); - free(cdataval); - xb.cur = (end + 4); // move current pointer past CDATA section - } else { - val=string(xb.getContent(&attr)); - } - } + else val=string(xb.getContent(&attr)); tag=xb.nextTag(); if (xb.nextEquals(tag,"/VALUE")) { |
From: Narasimha S. <nsh...@us...> - 2012-06-26 21:22:18
|
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 a09ce1cd98a5b61cc7248ee01949967547df6fd1 (commit) from 89a5b4332c34f3d432fe864b27c05701e9bde96a (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 a09ce1cd98a5b61cc7248ee01949967547df6fd1 Author: Narasimha Sharoff <nsh...@us...> Date: Tue Jun 26 14:20:49 2012 -0700 [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly Signed-off-by: Narasimha Sharoff <nsh...@us...> ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index 6321ae0..8c46c72 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-06-26 Narasimha Sharoff <nsh...@us...> + + * cimcClientSfcbLocal.c, cimXmlRequest.c, interopProvider.c, + providerDrv.c, queryOperation.h, queryStatement.c, + selectexp.c: + [ 3532494 ] interopProvider not honoring SourceNamespaces[] correctly + 2012-06-25 Narasimha Sharoff <nsh...@us...> * cimslpCMPI.c, cimXmlGen.c, cimXmlGen.h, cimXmlRequest.c, diff --git a/NEWS b/NEWS index de21215..236050c 100644 --- a/NEWS +++ b/NEWS @@ -102,6 +102,7 @@ New Features: - 3527920 RI and http responsecodes - 3534659 Match SfcbLocal to sfcc update - 3534977 sfcb custom library and hostname +- 3532494 interopProvider not honoring SourceNamespaces[] correctly Bugs Fixed: - 3514627 unsupported sfcb.cfg param - use exit call diff --git a/cimXmlOps.y b/cimXmlOps.y index 6503bd1..511a597 100644 --- a/cimXmlOps.y +++ b/cimXmlOps.y @@ -878,7 +878,7 @@ buildExecQueryRequest(void *parm) hdr->className = req->op.className.data; qs = parseQuery(MEM_TRACKED, (char *) req->op.query.data, - (char *) req->op.queryLang.data, NULL, &irc); + (char *) req->op.queryLang.data, NULL, NULL, &irc); fCls = qs->ft->getFromClassList(qs); if (irc) { diff --git a/cimcClientSfcbLocal.c b/cimcClientSfcbLocal.c index 78e3732..86444e0 100644 --- a/cimcClientSfcbLocal.c +++ b/cimcClientSfcbLocal.c @@ -799,7 +799,7 @@ execQuery(Client * mb, CMPIString *ns = cop->ft->getNameSpace(cop, NULL); oHdr.nameSpace = setCharsMsgSegment((char *) ns->hdl); - qs = parseQuery(MEM_TRACKED, query, lang, NULL, &irc); + qs = parseQuery(MEM_TRACKED, query, lang, NULL, NULL, &irc); if (irc) { CIMCSetStatusWithChars(rc, CMPI_RC_ERR_INVALID_QUERY, diff --git a/interopProvider.c b/interopProvider.c index a60f714..d5ee835 100644 --- a/interopProvider.c +++ b/interopProvider.c @@ -75,6 +75,7 @@ typedef struct filter { char *lang; char *type; char *sns; + CMPIArray *snsa; } Filter; typedef struct handler { @@ -228,7 +229,8 @@ static Filter * addFilter(const CMPIInstance *ci, const char *key, QLStatement * qs, - const char *query, const char *lang, const char *sns) + const char *query, const char *lang, const char *sns, + const CMPIArray *snsa) { Filter *fi; @@ -253,6 +255,8 @@ addFilter(const CMPIInstance *ci, fi->query = strdup(query); fi->lang = strdup(lang); fi->sns = strdup(sns); + if (snsa) fi->snsa=snsa->ft->clone(snsa, NULL); + else fi->snsa = NULL; fi->type = NULL; filterHt->ft->put(filterHt, key, fi); _SFCB_RETURN(fi); @@ -295,6 +299,7 @@ removeFilter(Filter * fi, char *key) free(fi->query); free(fi->lang); free(fi->sns); + if (fi->snsa) CMRelease(fi->snsa); free(fi); } @@ -465,79 +470,101 @@ genericSubscriptionRequest(const char *principal, ("principal %s, class %s, type %s, optype %d", principal, cn, type, optype)); - if (rrc) - *rrc = 0; - path = TrackedCMPIObjectPath(fi->sns, cn, &rc); - - sreq.principal = setCharsMsgSegment(principal); - sreq.objectPath = setObjectPathMsgSegment(path); - sreq.query = setCharsMsgSegment(fi->query); - sreq.language = setCharsMsgSegment(fi->lang); - sreq.type = setCharsMsgSegment((char *) type); - fi->type = strdup(type); - sreq.sns = setCharsMsgSegment(fi->sns); - sreq.filterId = fi; - - req.nameSpace = setCharsMsgSegment(fi->sns); - req.className = setCharsMsgSegment((char *) cn); - - memset(&binCtx, 0, sizeof(BinRequestContext)); - binCtx.oHdr = &req; - binCtx.bHdr = &sreq.hdr; - binCtx.bHdrSize = sizeof(sreq); - binCtx.chunkedMode = binCtx.xmlAs = 0; - - _SFCB_TRACE(1, ("--- getProviderContext for %s-%s", fi->sns, cn)); - - irc = getProviderContext(&binCtx); + /* + * Use SourceNamespaces[] when provided. Iterate through the array + * of namespaces and activate filters. + * + * SourceNameSpace is used only when the SourceNamespaces[] is null + */ + int n,j; + char *save_sns = fi->sns; /* Save original fi->sns */ + char *tmpns = malloc(512); /* Length of namespace. Todo:look for #define */ + if (fi->snsa == NULL) n = 1; /* SourceNamespace when array is NULL */ + else n = CMGetArrayCount(fi->snsa, NULL); + for (j=0; j < n; j++) { + if (fi->snsa != NULL) { + strcpy(tmpns, + CMGetCharPtr(CMGetArrayElementAt(fi->snsa, j, NULL).value.string)); + fi->sns = tmpns; /* replacing the sns pointer */ + _SFCB_TRACE(4, ("--- activating filter ns[%d]:%s",j,fi->sns)); + } - if (irc == MSG_X_PROVIDER) { - _SFCB_TRACE(1, ("--- Invoking Providers")); - /* - * one good provider makes success - */ - resp = invokeProviders(&binCtx, &err, &cnt); - if (err == 0) { - setStatus(&st, 0, NULL); - } else { - setStatus(&st, resp[err - 1]->rc, NULL); - for (i = 0; i < binCtx.pCount; i++) { - if (resp[i]->rc == 0) { + if (rrc) + *rrc = 0; + path = TrackedCMPIObjectPath(fi->sns, cn, &rc); + + sreq.principal = setCharsMsgSegment(principal); + sreq.objectPath = setObjectPathMsgSegment(path); + sreq.query = setCharsMsgSegment(fi->query); + sreq.language = setCharsMsgSegment(fi->lang); + sreq.type = setCharsMsgSegment((char *) type); + fi->type = strdup(type); + sreq.sns = setCharsMsgSegment(fi->sns); + sreq.filterId = fi; + + req.nameSpace = setCharsMsgSegment(fi->sns); + req.className = setCharsMsgSegment((char *) cn); + + memset(&binCtx, 0, sizeof(BinRequestContext)); + binCtx.oHdr = &req; + binCtx.bHdr = &sreq.hdr; + binCtx.bHdrSize = sizeof(sreq); + binCtx.chunkedMode = binCtx.xmlAs = 0; + + _SFCB_TRACE(1, ("--- getProviderContext for %s-%s", fi->sns, cn)); + + irc = getProviderContext(&binCtx); + + if (irc == MSG_X_PROVIDER) { + _SFCB_TRACE(1, ("--- Invoking Providers")); + /* + * one good provider makes success + */ + resp = invokeProviders(&binCtx, &err, &cnt); + if (err == 0) { setStatus(&st, 0, NULL); - break; + } else { + setStatus(&st, resp[err - 1]->rc, NULL); + for (i = 0; i < binCtx.pCount; i++) { + if (resp[i]->rc == 0) { + setStatus(&st, 0, NULL); + break; + } + } } } - } - } - else { - if (rrc) - *rrc = irc; - if (irc == MSG_X_PROVIDER_NOT_FOUND) - setStatus(&st, CMPI_RC_ERR_FAILED, + else { + if (rrc) + *rrc = irc; + if (irc == MSG_X_PROVIDER_NOT_FOUND) + setStatus(&st, CMPI_RC_ERR_FAILED, "No eligible indication provider found"); - else { - char msg[512]; - snprintf(msg, 511, + else { + char msg[512]; + snprintf(msg, 511, "Failing to find eligible indication provider. Rc: %d", irc); - setStatus(&st, CMPI_RC_ERR_FAILED, msg); - } - } + setStatus(&st, CMPI_RC_ERR_FAILED, msg); + } + } - if (resp) { - cnt = binCtx.pCount; - while (cnt--) { - if (resp[cnt]) { - free(resp[cnt]); + if (resp) { + cnt = binCtx.pCount; + while (cnt--) { + if (resp[cnt]) { + free(resp[cnt]); + } + } + free(resp); + closeProviderContext(&binCtx); } - } - free(resp); - closeProviderContext(&binCtx); - } - if (fi->type) { - free(fi->type); - } + if (fi->type) { + free(fi->type); + } + } + fi->sns = save_sns; /* restore back fi->sns */ + if (tmpns) free(tmpns); _SFCB_RETURN(st); } @@ -765,6 +792,7 @@ initInterOp(const CMPIBroker * broker, const CMPIContext *ctx) *query, *lng, *sns; + CMPIArray *snsa = NULL; QLStatement *qs = NULL; int rc; @@ -789 |
From: Narasimha S. <nsh...@us...> - 2012-06-25 21:30:52
|
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 89a5b4332c34f3d432fe864b27c05701e9bde96a (commit) from 7ec7ffe9ddfd787c1a9df94aecf6a7f529bffe91 (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 89a5b4332c34f3d432fe864b27c05701e9bde96a Author: Narasimha Sharoff <nsh...@us...> Date: Mon Jun 25 14:29:20 2012 -0700 [ 3534977 ] sfcb custom library and hostname ----------------------------------------------------------------------- Summary of changes: diff --git a/sfcCustomLib.c b/sfcCustomLib.c new file mode 100644 index 0000000..f331461 --- /dev/null +++ b/sfcCustomLib.c @@ -0,0 +1,70 @@ + +/* + * sfcCustomLib.c + * + * (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: Narasimha Sharoff <nsh...@us...> + * + * Description: + * + * These routines are used by sfcb. User can customize the functionality. + * Do not remove any function or the function prototype + * +*/ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <unistd.h> + +/* + * _sfcGetSlpHostname: by Tyrel Datwyler <ty...@us...> + * is from sfcSlpCustomHostname.c - this file will be deprecated +*/ + +/** \brief _sfcGetSlpHostname - obtains custom hostname to register with SLP DA + * + * Obtain custom hostname string to register with SLP DA + * This is only a sample of how to write the custom routine + * used to provide the hostname. You will need to replace this + * with a routine that uses the desired method to obtain the + * proper value. +*/ +extern int _sfcGetSlpHostname(char **hostname) +{ + char *sn; + sn = (char *) malloc((strlen("mycimom.com") + 1) * sizeof(char)); + sn = strncpy(sn, "mycimom.com", strlen("mycimom.com") + 1); + if (sn == NULL) + return 0; + + printf("-#- Request for custom SLP service hostname: (hostname = %s)\n", sn); + *hostname = sn; + + /* Return value of 1 for successs and 0 for failure. */ + return 1; +} + +/** \brief _sfcbGetResponseHostname - obtains custom hostname + * + * Allows the user to customize the hostname that sfcb will use internally + * httphost - hostname as provided in HTTP header + * hostname - sfcb allocated buffer + * len - size of the hostname buffer +*/ +extern int _sfcbGetResponseHostname(char *httpHost, char **hostname, unsigned int len) +{ + if (gethostname(*hostname, len) != 0) { + strcpy(*hostname, "localhost"); + } + + return 0; +} diff --git a/support.c b/support.c index e9ba2d4..48a17c7 100644 --- a/support.c +++ b/support.c @@ -1146,6 +1146,7 @@ int getCustomHostname(char *httpHost, char **hn, unsigned int len) int getCustomSlpHostname(char **hn) { if (sfcbSlpHostname) return(sfcbSlpHostname(hn)); + return -1; } void unloadHostnameLib() hooks/post-receive -- SFCB - Small Footprint CIM Broker |