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: Dave B. <bla...@us...> - 2012-02-21 15:33:11
|
Update of /cvsroot/sblim/jsr48-client/src/javax/wbem/listener In directory vz-cvs-3.sog:/tmp/cvs-serv3883/src/javax/wbem/listener Modified Files: Tag: Experimental WBEMListenerFactory.java Log Message: 3490009 - TCK: Too many WBEMListenerFactory class methods Index: WBEMListenerFactory.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/javax/wbem/listener/WBEMListenerFactory.java,v retrieving revision 1.4.2.8 retrieving revision 1.4.2.9 diff -u -d -r1.4.2.8 -r1.4.2.9 --- WBEMListenerFactory.java 29 Jul 2010 18:44:01 -0000 1.4.2.8 +++ WBEMListenerFactory.java 21 Feb 2012 15:33:07 -0000 1.4.2.9 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2010 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -19,6 +19,7 @@ * 2798931 2009-06-01 raman_arora Fix spelling of getPROTOCOLS() * 2882448 2009-10-21 blaschke-oss Add WBEMClientConstants from JSR48 * 2959240 2010-02-25 blaschke-oss Sync up javax.listener.* javadoc with JSR48 1.0.0 + * 3490009 2012-02-21 blaschke-oss TCK: Too many WBEMListenerFactory class methods */ package javax.wbem.listener; @@ -75,18 +76,6 @@ } /** - * Get the names of the supported PROTOCOLS. - * - * @deprecated : Typo in method name, use getProtocols() instead - * - * @return A string array of the protocol names supported. - */ - @Deprecated - public static String[] getPROTOCOLS() { - return PROTOCOLS; - } - - /** * Get the names of the supported protocols. * * @return A string array of the protocol names supported. |
From: Dave B. <bla...@us...> - 2012-02-20 18:59:39
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv7392 Modified Files: NEWS sblim-cim-client2.properties Log Message: 3485074 - An Indication trace request Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.252 retrieving revision 1.253 diff -u -d -r1.252 -r1.253 --- NEWS 20 Feb 2012 18:37:50 -0000 1.252 +++ NEWS 20 Feb 2012 18:59:36 -0000 1.253 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3485074 An Indication trace request 3477087 Need Access to an Indication Sender's IP Address 3484014 Add LogAndTraceBroker.isLoggable for message/trace 3480115 Add Jsr48SfcbIndicationSample Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- sblim-cim-client2.properties 15 Dec 2011 12:27:50 -0000 1.23 +++ sblim-cim-client2.properties 20 Feb 2012 18:59:36 -0000 1.24 @@ -645,3 +645,27 @@ # Default: 0 # #sblim.wbem.listenerReliableIndicationHashtableCapacity=0 + +# The filter to use for tracing of incoming indications at the FINE level. +# +# If string is empty, no tracing of incoming indications will occur. If +# string is not empty, it identifies one or more properties to be included +# in the trace of all incoming indications. An optional class can be used +# to filter the output to include only those indications that contain the +# substring. For example, to trace the SequenceContext and SequenceNumber +# properties of all alerts, use the following: +# +# alert:sequencecontext,sequencenumber +# +# To trace the IndicationTime of all indications, use the following: +# +# indicationtime +# +# Note: This property has no effect unless tracing is enabled. See the +# sblim.wbem.traceFileLevel property. +# +# Type: String +# Recognition: On next creation of WBEMListener +# Format: [class:]property[,property]* +# +#sblim.wbem.listener.IndicationTraceFilter= \ No newline at end of file |
From: Dave B. <bla...@us...> - 2012-02-20 18:59:38
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util In directory vz-cvs-3.sog:/tmp/cvs-serv7392/src/org/sblim/cimclient/internal/util Modified Files: WBEMConfiguration.java Log Message: 3485074 - An Indication trace request Index: WBEMConfiguration.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/util/WBEMConfiguration.java,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- WBEMConfiguration.java 15 Dec 2011 12:27:49 -0000 1.38 +++ WBEMConfiguration.java 20 Feb 2012 18:59:36 -0000 1.39 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2011 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -36,6 +36,7 @@ * 3277928 2011-04-06 blaschke-oss CIM-XML tracing cannot be enabled in the field * 3206904 2011-05-03 blaschke-oss Indication listener deadlock causes JVM to run out sockets * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs + * 3485074 2012-02-06 blaschke-oss An Indication trace request */ package org.sblim.cimclient.internal.util; @@ -944,4 +945,14 @@ WBEMConfigurationProperties.LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY, WBEMConfigurationDefaults.LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY)); } + + /** + * Returns the filter to use for tracing of incoming indications at the FINE + * level + * + * @return The indication trace filter + */ + public String getListenerIndicationTraceFilter() { + return getProperty(WBEMConfigurationProperties.LISTENER_INDICATION_TRACE_FILTER, null); + } } |
From: Dave B. <bla...@us...> - 2012-02-20 18:37:52
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv3955/src/org/sblim/cimclient Modified Files: WBEMListenerSBLIM.java Added Files: IndicationListenerSBLIM.java Log Message: 3477087 - Need Access to an Indication Sender's IP Address Index: WBEMListenerSBLIM.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/WBEMListenerSBLIM.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- WBEMListenerSBLIM.java 17 Jan 2012 14:11:11 -0000 1.15 +++ WBEMListenerSBLIM.java 20 Feb 2012 18:37:50 -0000 1.16 @@ -22,12 +22,14 @@ * 3023348 2010-07-02 blaschke-oss Listener uses # constructor instead of valueOf * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues * 3469018 2012-01-03 blaschke-oss Properties not passed to CIMIndicationHandler + * 3477087 2012-01-23 blaschke-oss Need Access to an Indication Sender's IP Address */ package org.sblim.cimclient; import java.io.IOException; import java.net.BindException; +import java.util.EventListener; import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -56,7 +58,7 @@ */ public static class WBEMListenerImpl { - private IndicationListener iIndicationListener; + private EventListener iIndicationListener; private HttpServerConnection iConnection; @@ -66,24 +68,27 @@ * @param pLocalAddress * The local address to bind the port to. If null the port is * bound to all local addresses. For use on multi-homed - * systems - * + * systems. * @param pPort * The port to listen on. If zero any free port will be * chosen. * @param pSSL - * SSL secured connection ? + * SSL secured connection? * @param pIndicationListener * The indication listener to forward the incoming - * indications to + * indications to (an instance of IndicationListener or + * IndicationListenerSBLIM). * @param pProperties - * The configuration + * The configuration. * @throws IOException */ public WBEMListenerImpl(String pLocalAddress, int pPort, boolean pSSL, - IndicationListener pIndicationListener, Properties pProperties) throws IOException { + EventListener pIndicationListener, Properties pProperties) throws IOException { WBEMConfiguration config = (pProperties != null ? new WBEMConfiguration(pProperties) : WBEMConfiguration.getGlobalConfiguration()); + if (!(pIndicationListener instanceof IndicationListener) + && !(pIndicationListener instanceof IndicationListenerSBLIM)) throw new IllegalArgumentException( + "Listener must be instance of IndicationListener or IndicationListenerSBLIM"); this.iIndicationListener = pIndicationListener; CIMEventDispatcher eventDispatcher = new CIMEventDispatcher(this.iIndicationListener); CIMIndicationHandler indicationHandler = new CIMIndicationHandler(eventDispatcher, @@ -100,32 +105,43 @@ } /** - * start + * Starts the HTTP server connection receiving the indications. */ public void start() { this.iConnection.start(); } /** - * stop + * Stops the HTTP server connection receiving the indications. */ public void stop() { this.iConnection.close(); } /** - * Returns the listener we forward the indications to + * Returns the listener we forward the indications to. * - * @return The listener + * @return The listener. */ public IndicationListener getIndicationListener() { - return this.iIndicationListener; + return (this.iIndicationListener instanceof IndicationListener) ? (IndicationListener) this.iIndicationListener + : null; } /** - * Returns the listener port + * Returns the listener we forward the indications to. * - * @return The listener port + * @return The listener. + */ + public IndicationListenerSBLIM getIndicationListenerSBLIM() { + return (this.iIndicationListener instanceof IndicationListenerSBLIM) ? (IndicationListenerSBLIM) this.iIndicationListener + : null; + } + + /** + * Returns the listener port. + * + * @return The listener port. */ public int getListenerPort() { return this.iConnection.getPort(); @@ -161,7 +177,7 @@ */ public int addListener(IndicationListener pListener, int pPort, String pTransport) throws IOException { - return addListener(pListener, pPort, pTransport, null, null); + return addListener((EventListener) pListener, pPort, pTransport, null, null); } /* @@ -172,30 +188,130 @@ */ public int addListener(IndicationListener pListener, int pPort, String pTransport, String pLocalAddr) throws IOException { - return addListener(pListener, pPort, pTransport, pLocalAddr, null); + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, null); } /** * Add a new listener using the specified port. * * @param pListener - * - The Indication Listener that will be called when an + * The Indication Listener that will be called when an indication + * is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @param pConfigurationProperties + * The individual configuration properties for this listener. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListener pListener, int pPort, String pTransport, + String pLocalAddr, Properties pConfigurationProperties) throws IOException { + + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, + pConfigurationProperties); + } + + /** + * Add a new listener using the specified port. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an * indication is received. * @param pPort - * - The port to listen on. Use 0 to specify any available port. + * The port to listen on. Use 0 to specify any available port. * @param pTransport - * - The transport to use (e.g. HTTP or HTTPS). + * The transport to use (e.g. HTTP or HTTPS). + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport) + throws IOException { + return addListener((EventListener) pListener, pPort, pTransport, null, null); + } + + /** + * Add a new listener using the specified port and local address. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an + * indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). * @param pLocalAddr - * - The local IP address to bind to. This is only needed in + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, + String pLocalAddr) throws IOException { + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, null); + } + + /** + * Add a new listener using the specified port, local address and + * properties. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an + * indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in * multi-homed systems. A value of <code>null</code> will bind to * all IP addresses. * @param pConfigurationProperties - * - The individual configuration properties for this listener + * The individual configuration properties for this listener. * @return The port that was used. * @throws IOException - * - This exception is thrown when binding to pPort fails. + * This exception is thrown when binding to pPort fails. */ - public synchronized int addListener(IndicationListener pListener, int pPort, String pTransport, + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, + String pLocalAddr, Properties pConfigurationProperties) throws IOException { + + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, + pConfigurationProperties); + } + + /** + * Add a new listener using the specified port, local address and + * properties. This is the worker routine for all public addListener + * methods. + * + * @param pListener + * The indication listener (<code>IndicationListener</code> or + * <code>IndicationListenerSBLIM</code>) that will be called when + * an indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @param pConfigurationProperties + * The individual configuration properties for this listener. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + private synchronized int addListener(EventListener pListener, int pPort, String pTransport, String pLocalAddr, Properties pConfigurationProperties) throws IOException { if (pPort > 0 && this.iPortMap.containsKey(Integer.valueOf(pPort))) { throw new BindException( --- NEW FILE: IndicationListenerSBLIM.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, IBM, a.w...@de... * @author : Dave Blaschke, IBM, bla...@us... * * Change History * Flag Date Prog Description *------------------------------------------------------------------------------- * 3477087 2012-01-23 blaschke-oss Need Access to an Indication Sender's IP Address */ package org.sblim.cimclient; import java.net.InetAddress; import java.util.EventListener; import javax.cim.CIMInstance; /** * This interface is implemented by the code that wants to create a listener for * indications. See the <code>WBEMListenerFactory</code> class for an example. * * The difference between this interface and <code>IndicationListener</code> is * that the JSR48 standard (<code>javax.wbem.listener.IndicationListener</code>) * does not allow for the listener to receive the IP of the indication sender * whereas this internal interface ( * <code>org.sblim.cimclinet.IndicationListenerSBLIM</code>) does. */ public interface IndicationListenerSBLIM extends EventListener { /** * Called when an indication has been received by the listener * * @param pIndicationURL * The URL to which the indication was posted. For example if the * indication was delivered over the https protocol to the * destination listener https://hostname:6111/, pIndicationURL * would be set to https://hostname:6111/. * @param pIndication * The indication received. * @param pSenderIP * The internet address of the indication sender. */ public void indicationOccured(String pIndicationURL, CIMInstance pIndication, InetAddress pSenderIP); } |
From: Dave B. <bla...@us...> - 2012-02-20 17:47:59
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv30389 Modified Files: NEWS Log Message: 3484014 - Add LogAndTraceBroker.isLoggable for message/trace Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.250 retrieving revision 1.251 diff -u -d -r1.250 -r1.251 --- NEWS 20 Feb 2012 17:13:35 -0000 1.250 +++ NEWS 20 Feb 2012 17:47:56 -0000 1.251 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3484014 Add LogAndTraceBroker.isLoggable for message/trace 3480115 Add Jsr48SfcbIndicationSample 3469427 Fix broken HTML links 3469210 Include reliable indications in HTML |
From: Dave B. <bla...@us...> - 2012-02-20 17:47:58
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging In directory vz-cvs-3.sog:/tmp/cvs-serv30389/src/org/sblim/cimclient/internal/logging Modified Files: LogAndTraceBroker.java Log Message: 3484014 - Add LogAndTraceBroker.isLoggable for message/trace Index: LogAndTraceBroker.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/logging/LogAndTraceBroker.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- LogAndTraceBroker.java 17 Jan 2012 14:11:11 -0000 1.23 +++ LogAndTraceBroker.java 20 Feb 2012 17:47:56 -0000 1.24 @@ -26,6 +26,7 @@ * 3252669 2011-03-28 blaschke-oss setXmlTraceStream blindly closes previous stream * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues * 3469018 2012-01-03 blaschke-oss Properties not passed to CIMIndicationHandler + * 3484014 2012-02-03 blaschke-oss Add LogAndTraceBroker.isLoggable for message/trace */ package org.sblim.cimclient.internal.logging; @@ -111,6 +112,28 @@ private final String iTHROWABLE = Throwable.class.getName(); + private int iInternalLevelConsole = Level.OFF.intValue(); + + private int iInternalLevelLogFile = Level.OFF.intValue(); + + private int iInternalLevelTraceFile = Level.OFF.intValue(); + + private LogListener iInternalListenerLogConsole = null; + + private LogListener iInternalListenerLogFile = null; + + private TraceListener iInternalListenerTraceConsole = null; + + private TraceListener iInternalListenerTraceFile = null; + + private int iNumInternalLogListeners = 0; + + private int iNumExternalLogListeners = 0; + + private int iNumInternalTraceListeners = 0; + + private int iNumExternalTraceListeners = 0; + private LogAndTraceBroker() { this.iLogListeners = new ArrayList<LogListener>(); this.iTraceListeners = new ArrayList<TraceListener>(); @@ -133,7 +156,9 @@ logger.addHandler(handler); logger.setLevel(level); logger.setUseParentHandlers(false); - addLogListener(new LogListener() { + this.iInternalLevelConsole = level.intValue(); + if (this.iInternalListenerLogConsole != null) removeLogListener(this.iInternalListenerLogConsole); + this.iInternalListenerLogConsole = new LogListener() { public void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) { @@ -141,7 +166,8 @@ record.setParameters(pParameters); logger.log(record); } - }); + }; + addLogListener(this.iInternalListenerLogConsole); } } catch (Exception e) { // Don't crash for logging @@ -159,7 +185,9 @@ logger.addHandler(handler); logger.setLevel(level); logger.setUseParentHandlers(false); - addLogListener(new LogListener() { + this.iInternalLevelLogFile = level.intValue(); + if (this.iInternalListenerLogFile != null) removeLogListener(this.iInternalListenerLogFile); + this.iInternalListenerLogFile = new LogListener() { public void log(Level pLevel, String pMessageKey, String pMessage, Object[] pParameters) { @@ -167,7 +195,8 @@ record.setParameters(pParameters); logger.log(record); } - }); + }; + addLogListener(this.iInternalListenerLogFile); } } catch (Exception e) { // Don't crash for logging @@ -183,7 +212,9 @@ logger.addHandler(handler); logger.setLevel(level); logger.setUseParentHandlers(false); - addTraceListener(new TraceListener() { + this.iInternalLevelConsole = level.intValue(); + if (this.iInternalListenerTraceConsole != null) removeTraceListener(this.iInternalListenerTraceConsole); + this.iInternalListenerTraceConsole = new TraceListener() { public void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) { LogRecord record = new LogRecord(pLevel, pMessage); @@ -198,7 +229,8 @@ record.setThrown(pThrown); logger.log(record); } - }); + }; + addTraceListener(this.iInternalListenerTraceConsole); } } catch (Exception e) { // Don't crash for logging @@ -216,7 +248,9 @@ logger.addHandler(handler); logger.setLevel(level); logger.setUseParentHandlers(false); - addTraceListener(new TraceListener() { + this.iInternalLevelTraceFile = level.intValue(); + if (this.iInternalListenerTraceFile != null) removeTraceListener(this.iInternalListenerTraceFile); + this.iInternalListenerTraceFile = new TraceListener() { public void trace(Level pLevel, StackTraceElement pOrigin, String pMessage) { LogRecord record = new LogRecord(pLevel, pMessage); @@ -231,7 +265,8 @@ record.setThrown(pThrown); logger.log(record); } - }); + }; + addTraceListener(this.iInternalListenerTraceFile); } } catch (Exception e) { // Don't crash for logging @@ -246,10 +281,20 @@ * The listener */ public synchronized void addLogListener(LogListener pListener) { + if (pListener == null) return; sendGreetings(pListener); ArrayList<LogListener> newListeners = new ArrayList<LogListener>(this.iLogListeners); newListeners.add(pListener); this.iLogListeners = newListeners; + + if ((this.iInternalListenerLogFile != null && this.iInternalListenerLogFile + .equals(pListener)) + || (this.iInternalListenerLogConsole != null && this.iInternalListenerLogConsole + .equals(pListener))) { + this.iNumInternalLogListeners++; + } else { + this.iNumExternalLogListeners++; + } } private void loadVersionTxt() { @@ -356,8 +401,23 @@ */ public synchronized void removeLogListener(LogListener pListener) { ArrayList<LogListener> newListeners = new ArrayList<LogListener>(this.iLogListeners); - newListeners.remove(pListener); + if (!newListeners.remove(pListener)) return; this.iLogListeners = newListeners; + + if (this.iInternalListenerLogFile != null + && this.iInternalListenerLogFile.equals(pListener)) { + // Removing internal log listener for file + this.iInternalListenerLogFile = null; + this.iNumInternalLogListeners--; + } else if (this.iInternalListenerLogConsole != null + && this.iInternalListenerLogConsole.equals(pListener)) { + // Removing internal log listener for console + this.iInternalListenerLogConsole = null; + this.iNumInternalLogListeners--; + } else { + // Removing user log listener + this.iNumExternalLogListeners--; + } } /** @@ -368,6 +428,11 @@ this.iLogListeners = new ArrayList<LogListener>(); removeHandlers(Logger.getLogger(CONSOLE_LOGGER)); removeHandlers(Logger.getLogger(FILE_LOGGER)); + + this.iInternalListenerLogFile = null; + this.iInternalListenerLogConsole = null; + this.iNumInternalLogListeners = 0; + this.iNumExternalLogListeners = 0; } /** @@ -388,10 +453,20 @@ * The listener */ public synchronized void addTraceListener(TraceListener pListener) { + if (pListener == null) return; sendGreetings(pListener); ArrayList<TraceListener> newListeners = new ArrayList<TraceListener>(this.iTraceListeners); newListeners.add(pListener); this.iTraceListeners = newListeners; + + if ((this.iInternalListenerTraceFile != null && this.iInternalListenerTraceFile + .equals(pListener)) + || (this.iInternalListenerTraceConsole != null && this.iInternalListenerTraceConsole + .equals(pListener))) { + this.iNumInternalTraceListeners++; + } else { + this.iNumExternalTraceListeners++; + } } /** @@ -403,8 +478,23 @@ */ public synchronized void removeTraceListener(TraceListener pListener) { ArrayList<TraceListener> newListeners = new ArrayList<TraceListener>(this.iTraceListeners); - newListeners.remove(pListener); + if (!newListeners.remove(pListener)) return; this.iTraceListeners = newListeners; + + if (this.iInternalListenerTraceFile != null + && this.iInternalListenerTraceFile.equals(pListener)) { + // Removing internal tracelistener for file + this.iInternalListenerTraceFile = null; + this.iNumInternalTraceListeners--; + } else if (this.iInternalListenerTraceConsole != null + && this.iInternalListenerTraceConsole.equals(pListener)) { + // Removing internal trace listener for console + this.iInternalListenerTraceConsole = null; + this.iNumInternalTraceListeners--; + } else { + // Removing user trace listener + this.iNumExternalTraceListeners--; + } } /** @@ -414,6 +504,11 @@ public synchronized void clearTraceListeners() { this.iTraceListeners = new ArrayList<TraceListener>(); removeHandlers(Logger.getLogger(TRACE_LOGGER)); + + this.iInternalListenerTraceFile = null; + this.iInternalListenerTraceConsole = null; + this.iNumInternalTraceListeners = 0; + this.iNumExternalTraceListeners = 0; } /** @@ -599,4 +694,90 @@ } } + /** + * Checks whether there are trace listeners installed that will log a trace + * message with the specified level. Use this method to determine if a + * trace() method call could result in logging before preparing the + * information to be logged. For example: + * + * <pre> + * if (logger.isLoggableTrace(Level.WARNING) { + * // Prepare info for logging + * logger.trace(Level.WARNING, ... + * </pre> + * + * @param pLevel + * The <code>Level</code> of the trace message. + * @return <code>true</code> if trace message could be logged, + * <code>false</code> otherwise. + */ + public boolean isLoggableTrace(Level pLevel) { + // If there are no trace listeners or specified level is OFF, message + // will not be logged + if (this.iTraceListeners.size() == 0 || pLevel.intValue() == Level.OFF.intValue()) return false; + + // If there are external trace listeners, message could be logged (user + // can alter level at will, so we do not know what it is) + if (this.iNumExternalTraceListeners > 0) return true; + + // If there are internal trace listeners, determine if message will be + // logged + if (this.iNumInternalTraceListeners > 0) { + int level = Level.OFF.intValue(); + if (this.iInternalListenerTraceFile != null) { + level = this.iInternalLevelTraceFile; + } + if (this.iInternalListenerTraceConsole != null && level > this.iInternalLevelConsole) { + level = this.iInternalLevelConsole; + } + return level <= pLevel.intValue(); + } + + return true; + } + + /** + * Checks whether there are log listeners installed that will log a message + * with the specified level. Use this method to determine if a message() + * method call could result in logging before preparing the information to + * be logged. For example: + * + * <pre> + * if (logger.isLoggableMessage(Level.WARNING) { + * // Prepare info for logging + * logger.message(Level.WARNING, ... + * </pre> + * + * @param pLevel + * The <code>Level</code> of the message. + * @return <code>true</code> if message could be logged, <code>false</code> + * otherwise. + */ + public boolean isLoggableMessage(Level pLevel) { + // If message is traceable, message could be logged + if (isLoggableTrace(pLevel)) return true; + + // If there are no log listeners or specified level is OFF, message + // will not be logged + if (this.iLogListeners.size() == 0 || pLevel.intValue() == Level.OFF.intValue()) return false; + + // If there are external log listeners, message could be logged (user + // can alter level at will, so we do not know what it is) + if (this.iNumExternalLogListeners > 0) return true; + + // If there are internal log listeners, determine if message will be + // logged + if (this.iNumInternalLogListeners > 0) { + int level = Level.OFF.intValue(); + if (this.iInternalListenerLogFile != null) { + level = this.iInternalLevelLogFile; + } + if (this.iInternalListenerLogConsole != null && level > this.iInternalLevelConsole) { + level = this.iInternalLevelConsole; + } + return level <= pLevel.intValue(); + } + + return true; + } } |
From: Dave B. <bla...@us...> - 2012-02-20 17:13:37
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv27690 Modified Files: NEWS Log Message: 3480115 - Add Jsr48SfcbIndicationSample Index: NEWS =================================================================== RCS file: /cvsroot/sblim/jsr48-client/NEWS,v retrieving revision 1.249 retrieving revision 1.250 diff -u -d -r1.249 -r1.250 --- NEWS 18 Jan 2012 13:06:47 -0000 1.249 +++ NEWS 20 Feb 2012 17:13:35 -0000 1.250 @@ -1,5 +1,6 @@ Changes in HEAD ================ +3480115 Add Jsr48SfcbIndicationSample 3469427 Fix broken HTML links 3469210 Include reliable indications in HTML 3469018 Properties not passed to CIMIndicationHandler |
From: Michael Chase-S. <mc...@us...> - 2012-02-17 22:55:02
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv30334 Modified Files: ChangeLog NEWS cimcClientSfcbLocal.c mlog.c mlog.h sfcBroker.c sfcbinst2mof.c Log Message: [ 3488688 ] Don't spawn logger for clients Index: sfcbinst2mof.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcbinst2mof.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sfcbinst2mof.c 9 Jan 2009 21:08:29 -0000 1.1 +++ sfcbinst2mof.c 17 Feb 2012 22:54:59 -0000 1.2 @@ -1,6 +1,7 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <syslog.h> #include "cmpidt.h" #include "cmpimacs.h" @@ -9,6 +10,7 @@ #include "objectImpl.h" #include "control.h" #include "array.h" +#include "mlog.h" #define VERSION "0.8.0" @@ -432,6 +434,7 @@ } + startLogging(LOG_INFO,0); // now let's get to work char *ns = namespace; char *clsname = classname; Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.713 retrieving revision 1.714 diff -u -d -r1.713 -r1.714 --- ChangeLog 15 Feb 2012 19:44:09 -0000 1.713 +++ ChangeLog 17 Feb 2012 22:54:59 -0000 1.714 @@ -1,3 +1,9 @@ +2012-02-17 Michael Chase-Salerno <br...@li...> + + * mlog.c, mlog.h, cimcClientSfcbLocal.c, + sfcBroker.c,sfcbinst2mof.c: + [ 3488688 ] Don't spawn logger for clients + 2012-02-15 Michael Chase-Salerno <br...@li...> * mlog.c: Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- sfcBroker.c 11 Feb 2012 18:51:58 -0000 1.59 +++ sfcBroker.c 17 Feb 2012 22:54:59 -0000 1.60 @@ -646,7 +646,7 @@ usage(1); } - startLogging(syslogLevel); + startLogging(syslogLevel,1); mlogf(M_INFO,M_SHOW,"--- %s V" sfcHttpDaemonVersion " started - %d\n", name, currentProc); Index: mlog.h =================================================================== RCS file: /cvsroot/sblim/sfcb/mlog.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mlog.h 7 Apr 2010 20:54:11 -0000 1.6 +++ mlog.h 17 Feb 2012 22:54:59 -0000 1.7 @@ -29,7 +29,7 @@ #define LOG_MSG_MAX 4096 -void startLogging(int level); +void startLogging(int level, int thread); void closeLogging(); void mlogf(int priority, int errout, const char* fmt, ...); Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.636 retrieving revision 1.637 diff -u -d -r1.636 -r1.637 --- NEWS 15 Feb 2012 19:44:09 -0000 1.636 +++ NEWS 17 Feb 2012 22:54:59 -0000 1.637 @@ -10,6 +10,8 @@ - 3446179 Add a feature to validate CMPI types - 3484025 Disable indication sequencing - 3462309 Do not allow multiple instances of sfcb +- 3488688 Don't spawn logger for clients + Bugs fixed: Index: cimcClientSfcbLocal.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimcClientSfcbLocal.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- cimcClientSfcbLocal.c 27 Sep 2011 15:31:48 -0000 1.43 +++ cimcClientSfcbLocal.c 17 Feb 2012 22:54:59 -0000 1.44 @@ -2035,7 +2035,7 @@ env->hdl=NULL; env->ft=&localFT; // enable logging when called from sfcc - startLogging(LOG_ERR); + startLogging(LOG_ERR,0); // enable trace logging _SFCB_TRACE_INIT(); Index: mlog.c =================================================================== RCS file: /cvsroot/sblim/sfcb/mlog.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- mlog.c 15 Feb 2012 19:44:09 -0000 1.13 +++ mlog.c 17 Feb 2012 22:54:59 -0000 1.14 @@ -30,6 +30,11 @@ #include <signal.h> #include "trace.h" /* for setSignal() */ #include <sys/wait.h> + +// Macro to open the syslog +#define OPENLOG(level) openlog("sfcb", LOG_PID, LOG_DAEMON); setlogmask(LOG_UPTO(level)); + + FILE *log_w_stream; int logfds[2] = { 0, 0 }; @@ -44,11 +49,10 @@ int priosysl; char buf[LOG_MSG_MAX]; - openlog("sfcb", LOG_PID, LOG_DAEMON); - setlogmask(LOG_UPTO(level)); + OPENLOG(level); stream = fdopen(listenFd, "r"); - + while (!feof(stream)) { fgets(buf, sizeof(buf), stream); @@ -78,9 +82,18 @@ /* * sets up the logging pipe and forks off the logger process */ -void startLogging(int level) { +void startLogging(int level, int thread) { + + // if we're a client, just open the log and + // don't start a logger. + if (! thread ) { + OPENLOG(level); + return; + } + pipe(logfds); int lpid; + lpid = fork(); if (lpid == 0) { |
From: Michael Chase-S. <mc...@us...> - 2012-02-15 19:44:11
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv32026 Modified Files: ChangeLog NEWS mlog.c Log Message: 3487675 Log messages can be concatenated Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.635 retrieving revision 1.636 diff -u -d -r1.635 -r1.636 --- NEWS 13 Feb 2012 23:10:20 -0000 1.635 +++ NEWS 15 Feb 2012 19:44:09 -0000 1.636 @@ -26,6 +26,7 @@ - 3486814 sfcb crashes while freeing the cimxml response - 3485830 SFCB Makes Redundant ActivateFilter Calls - 3487419 TestIndication Provider Does Enable Correctly +- 3487675 Log messages can be concatenated Changes in 1.3.13 ================= Index: mlog.c =================================================================== RCS file: /cvsroot/sblim/sfcb/mlog.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- mlog.c 22 Jun 2011 20:50:33 -0000 1.12 +++ mlog.c 15 Feb 2012 19:44:09 -0000 1.13 @@ -136,7 +136,15 @@ char buf[LOG_MSG_MAX]; va_start(ap, fmt); - vsnprintf(buf, LOG_MSG_MAX, fmt, ap); + // Leave a space for the /n on the end. + vsnprintf(buf, LOG_MSG_MAX-1, fmt, ap); + // Now check to make sure we have a /n at the end + int buflen=strlen(buf); + if ( buf[buflen-1] != '\n' ) { + strcat(buf,"\n"); + } + + /* * we sometimes call mlogf when sfcbd isn't started (i.e. via Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.712 retrieving revision 1.713 diff -u -d -r1.712 -r1.713 --- ChangeLog 13 Feb 2012 23:10:20 -0000 1.712 +++ ChangeLog 15 Feb 2012 19:44:09 -0000 1.713 @@ -1,3 +1,8 @@ +2012-02-15 Michael Chase-Salerno <br...@li...> + + * mlog.c: + [ 3487675 ] Log messages can be concatenated + 2012-02-13 Chris Buccella <buc...@li...> * test/TestProviders/cmpiTestIndicationProvider.c: |
From: Chris B. <buc...@us...> - 2012-02-13 23:10:22
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv9870 Modified Files: ChangeLog NEWS Log Message: [ 3487419 ] TestIndication Provider Does Enable Correctly Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.634 retrieving revision 1.635 diff -u -d -r1.634 -r1.635 --- NEWS 13 Feb 2012 22:48:59 -0000 1.634 +++ NEWS 13 Feb 2012 23:10:20 -0000 1.635 @@ -25,6 +25,7 @@ - 3485438 segfault while retrying to deliver an indication - 3486814 sfcb crashes while freeing the cimxml response - 3485830 SFCB Makes Redundant ActivateFilter Calls +- 3487419 TestIndication Provider Does Enable Correctly Changes in 1.3.13 ================= Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.711 retrieving revision 1.712 diff -u -d -r1.711 -r1.712 --- ChangeLog 13 Feb 2012 22:48:59 -0000 1.711 +++ ChangeLog 13 Feb 2012 23:10:20 -0000 1.712 @@ -1,5 +1,8 @@ 2012-02-13 Chris Buccella <buc...@li...> + * test/TestProviders/cmpiTestIndicationProvider.c: + [ 3487419 ] TestIndication Provider Does Enable Correctly + * interopProvider.c [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls |
From: Chris B. <buc...@us...> - 2012-02-13 22:49:01
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv6009 Modified Files: interopProvider.c ChangeLog NEWS Log Message: [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.633 retrieving revision 1.634 diff -u -d -r1.633 -r1.634 --- NEWS 11 Feb 2012 19:43:56 -0000 1.633 +++ NEWS 13 Feb 2012 22:48:59 -0000 1.634 @@ -24,6 +24,7 @@ - 3483294 InternalProvider Should Handle SFCB_RegisteredProfile - 3485438 segfault while retrying to deliver an indication - 3486814 sfcb crashes while freeing the cimxml response +- 3485830 SFCB Makes Redundant ActivateFilter Calls Changes in 1.3.13 ================= Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- interopProvider.c 4 Feb 2012 01:03:31 -0000 1.50 +++ interopProvider.c 13 Feb 2012 22:48:59 -0000 1.51 @@ -590,24 +590,29 @@ CMSetProperty((CMPIInstance *)ci, "SubscriptionStartTime", &dt, CMPI_dateTime); su=addSubscription(ci, skey, fi, ha); - fowardSubscription(ctx, fi, OPS_ActivateFilter, &st); - - if (st.rc != CMPI_RC_OK) removeSubscription(su, skey); - //activation succesful, try to enable it - else { - //check property - CMPIData d = CMGetProperty(ci, "SubscriptionState", &st); - if(d.state == CMPI_goodValue) { - if(d.value.uint16 == 2) { //==enabled - fowardSubscription(ctx, fi, OPS_EnableIndications, &st); - } - } else { - /* property not set, assume "enable" by default */ - val.uint16 = 2; - st = CMSetProperty((CMPIInstance*)ci, "SubscriptionState", &val, CMPI_uint16); + /* send Activate filter request only if we haven't aleady */ + if (fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_ActivateFilter, &st); + if (st.rc != CMPI_RC_OK) removeSubscription(su, skey); + } + + /* activation succesful, try to enable it */ + if (st.rc == CMPI_RC_OK) { + /* only enable if state is 2 (default) */ + CMPIData d = CMGetProperty(ci, "SubscriptionState", &st); + if(d.state == CMPI_goodValue) { + if(d.value.uint16 == 2 && fi->useCount == 1) { fowardSubscription(ctx, fi, OPS_EnableIndications, &st); - } - } + } + } else { + /* property not set, assume "enable" by default */ + val.uint16 = 2; + st = CMSetProperty((CMPIInstance*)ci, "SubscriptionState", &val, CMPI_uint16); + if (fi->useCount == 1) { + fowardSubscription(ctx, fi, OPS_EnableIndications, &st); + } + } + } _SFCB_RETURN(st); } Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.710 retrieving revision 1.711 diff -u -d -r1.710 -r1.711 --- ChangeLog 11 Feb 2012 19:44:20 -0000 1.710 +++ ChangeLog 13 Feb 2012 22:48:59 -0000 1.711 @@ -1,3 +1,8 @@ +2012-02-13 Chris Buccella <buc...@li...> + + * interopProvider.c + [ 3485830 ] SFCB Makes Redundant ActivateFilter Calls + 2012-02-11 Narasimha Sharoff <nsh...@us...> * cimXmlParser.c |
From: Narasimha S. <nsh...@us...> - 2012-02-11 19:44:22
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv28597 Modified Files: ChangeLog Log Message: [ 3486814 ] sfcb crashes while freeing the cimxml response Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.709 retrieving revision 1.710 diff -u -d -r1.709 -r1.710 --- ChangeLog 11 Feb 2012 18:54:17 -0000 1.709 +++ ChangeLog 11 Feb 2012 19:44:20 -0000 1.710 @@ -1,5 +1,10 @@ 2012-02-11 Narasimha Sharoff <nsh...@us...> + * cimXmlParser.c + [ 3486814 ] sfcb crashes while freeing the cimxml response + +2012-02-11 Narasimha Sharoff <nsh...@us...> + * sfcBroker.c [ 3462309 ] Do not allow multiple instances of sfcb |
From: Narasimha S. <nsh...@us...> - 2012-02-11 19:43:58
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv28573 Modified Files: NEWS Log Message: [ 3486814 ] sfcb crashes while freeing the cimxml response Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.632 retrieving revision 1.633 diff -u -d -r1.632 -r1.633 --- NEWS 11 Feb 2012 18:53:59 -0000 1.632 +++ NEWS 11 Feb 2012 19:43:56 -0000 1.633 @@ -13,7 +13,6 @@ Bugs fixed: -- 3485438 segfault while retrying to deliver an indication - 3414700 assocClass ignored for assoc upcalls - 3416055 SIGSEGV sometimes does not print provider name - 3416167 CIM_InstDeletion not in class repo by default @@ -23,6 +22,8 @@ - 3478930 Handle SIGPIPE in providerMgr - 3478933 Sequence Number reset issues - 3483294 InternalProvider Should Handle SFCB_RegisteredProfile +- 3485438 segfault while retrying to deliver an indication +- 3486814 sfcb crashes while freeing the cimxml response Changes in 1.3.13 ================= |
From: Narasimha S. <nsh...@us...> - 2012-02-11 19:43:34
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv28548 Modified Files: cimXmlParser.c Log Message: [ 3486814 ] sfcb crashes while freeing the cimxml response Index: cimXmlParser.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlParser.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- cimXmlParser.c 23 Nov 2011 03:24:00 -0000 1.36 +++ cimXmlParser.c 11 Feb 2012 19:43:32 -0000 1.37 @@ -1741,7 +1741,9 @@ { XtokParamValue * pv = op->first , *dv; while (pv) { - freeParamValue(pv); + /* 3486814 : type is invalid, value is null */ + if (pv->type != USHRT_MAX) + freeParamValue(pv); dv = pv; pv = pv->next; free(dv); |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:54:20
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv24432 Modified Files: ChangeLog Log Message: [ 3462309 ] Do not allow multiple instances of sfcb Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.708 retrieving revision 1.709 diff -u -d -r1.708 -r1.709 --- ChangeLog 11 Feb 2012 18:39:48 -0000 1.708 +++ ChangeLog 11 Feb 2012 18:54:17 -0000 1.709 @@ -1,5 +1,10 @@ 2012-02-11 Narasimha Sharoff <nsh...@us...> + * sfcBroker.c + [ 3462309 ] Do not allow multiple instances of sfcb + +2012-02-11 Narasimha Sharoff <nsh...@us...> + * indCIMXMLHandler.c [ 3485438 ] Segfault while retrying to deliver an indication |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:54:01
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv24388 Modified Files: NEWS Log Message: [ 3462309 ] Do not allow multiple instances of sfcb Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.631 retrieving revision 1.632 diff -u -d -r1.631 -r1.632 --- NEWS 11 Feb 2012 18:39:00 -0000 1.631 +++ NEWS 11 Feb 2012 18:53:59 -0000 1.632 @@ -9,6 +9,7 @@ - 3433733 CreationClassNames should be supplied - 3446179 Add a feature to validate CMPI types - 3484025 Disable indication sequencing +- 3462309 Do not allow multiple instances of sfcb Bugs fixed: |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:52:01
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv24319 Modified Files: sfcBroker.c Log Message: [ 3462309 ] Do not allow multiple instances of sfcb Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- sfcBroker.c 24 Jun 2011 20:13:20 -0000 1.58 +++ sfcBroker.c 11 Feb 2012 18:51:58 -0000 1.59 @@ -34,6 +34,12 @@ #include <signal.h> #include <sys/wait.h> +#include <stdlib.h> +#include <fcntl.h> +#include <dirent.h> +#include <sys/types.h> +#include <sys/stat.h> + #include "trace.h" #include "msgqueue.h" #include <pthread.h> @@ -478,6 +484,38 @@ exit(status); } +/* SF 3462309 : Check if there is an instance of sfcbd running; use procfs */ +static int +sfcb_is_running() +{ + #define STRBUF_LEN 512 + #define BUF_LEN 30 + struct dirent *dp = NULL; + char *strbuf = malloc(STRBUF_LEN); + char *buf = malloc(BUF_LEN); + int mypid = getpid(); + int ret = 0; + + DIR *dir = opendir("/proc"); + while ((dp = readdir(dir)) != NULL) { + if (isdigit(dp->d_name[0])) { + sprintf(buf, "/proc/%s/exe", dp->d_name); + memset(strbuf, 0, STRBUF_LEN); + if (readlink(buf, strbuf, STRBUF_LEN) == -1) continue; + if (strstr(strbuf, "sfcbd") != NULL) { + ret = strtol(dp->d_name, NULL, 0); + if (ret == mypid) { ret = 0; continue; } + break; + } + } + } + + closedir(dir); + free(buf); + free(strbuf); + return(ret); +} + static void version() { fprintf(stdout, "%s " sfcHttpDaemonVersion "\n", name); @@ -498,6 +536,13 @@ long dSockets,sSockets,pSockets; char *pauseStr; + /* SF 3462309 - If there is an instance running already, return */ + int pid_found = 0; + if ((pid_found = sfcb_is_running()) != 0) { + mlogf(M_ERROR, M_SHOW, " --- A previous instance of sfcbd [%d] is running. Exiting.\n", pid_found); + exit(1); + } + name = strrchr(argv[0], '/'); if (name != NULL) ++name; else name = argv[0]; |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:39:50
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv23723 Modified Files: ChangeLog Log Message: [ 3485438 ] Segfault while retrying to deliver an indication Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.707 retrieving revision 1.708 diff -u -d -r1.707 -r1.708 --- ChangeLog 4 Feb 2012 01:03:30 -0000 1.707 +++ ChangeLog 11 Feb 2012 18:39:48 -0000 1.708 @@ -1,3 +1,8 @@ +2012-02-11 Narasimha Sharoff <nsh...@us...> + + * indCIMXMLHandler.c + [ 3485438 ] Segfault while retrying to deliver an indication + 2012-02-03 Michael Chase-Salerno <br...@li...> * interopProvider.c, indCIMXMLHandler.c, sfcb.cfg.pre.in |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:39:02
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv23643 Modified Files: NEWS Log Message: [3485438] segfault while retrying to deliver an indication Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.630 retrieving revision 1.631 diff -u -d -r1.630 -r1.631 --- NEWS 4 Feb 2012 01:03:30 -0000 1.630 +++ NEWS 11 Feb 2012 18:39:00 -0000 1.631 @@ -12,6 +12,7 @@ Bugs fixed: +- 3485438 segfault while retrying to deliver an indication - 3414700 assocClass ignored for assoc upcalls - 3416055 SIGSEGV sometimes does not print provider name - 3416167 CIM_InstDeletion not in class repo by default |
From: Narasimha S. <nsh...@us...> - 2012-02-11 18:30:57
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv22285 Modified Files: indCIMXMLHandler.c Log Message: [3485438] segfault while retrying to deliver an indication Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- indCIMXMLHandler.c 4 Feb 2012 01:03:30 -0000 1.42 +++ indCIMXMLHandler.c 11 Feb 2012 18:30:54 -0000 1.43 @@ -629,10 +629,14 @@ // queue is empty free(cur); RQhead=NULL; + RQtail=NULL; } else { //not last cur->prev->next=cur->next; cur->next->prev=cur->prev; + /* 3485438 - update qhead/qtail */ + if (cur == RQhead) RQhead=cur->next; + if (cur == RQtail) RQtail=cur->prev; CMRelease(cur->ref); CMRelease(cur->sub); if (cur) free(cur); |
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications In directory vz-cvs-3.sog:/tmp/cvs-serv29940/src/org/sblim/cimclient/internal/wbem/indications Modified Files: Tag: Experimental ReliableIndicationHandler.java CIMIndicationHandler.java Added Files: Tag: Experimental RIHandlerTest.txt Log Message: 3484022 - Turn reliable indication mode on and off based on SC/SN Index: CIMIndicationHandler.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications/CIMIndicationHandler.java,v retrieving revision 1.10.2.20 retrieving revision 1.10.2.21 diff -u -d -r1.10.2.20 -r1.10.2.21 --- CIMIndicationHandler.java 7 Feb 2012 03:15:28 -0000 1.10.2.20 +++ CIMIndicationHandler.java 8 Feb 2012 15:39:31 -0000 1.10.2.21 @@ -38,6 +38,7 @@ * 3390724 2011-08-12 blaschke-oss Problem with Reliable Indication support in the Listener * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs * 3485074 2012-02-06 blaschke-oss An Indication trace request + * 3484022 2012-02-08 blaschke-oss Turn reliable indication mode on and off based on SC/SN */ package org.sblim.cimclient.internal.wbem.indications; @@ -108,17 +109,14 @@ private boolean iRIInitialized = false; - private boolean iRISupported = false; - private ReliableIndicationHandler iRIHandler; public IndicationServer() { // initialize() does the work } - public void initialize(boolean pRISupported, ReliableIndicationHandler pRIHandler) { + public void initialize(ReliableIndicationHandler pRIHandler) { this.iRIInitialized = true; - this.iRISupported = pRISupported; this.iRIHandler = pRIHandler; } @@ -126,10 +124,6 @@ return this.iRIInitialized; } - public boolean isRISupported() { - return this.iRISupported; - } - public ReliableIndicationHandler getRIHandler() { return this.iRIHandler; } @@ -516,43 +510,8 @@ server = getIndicationServerFromTable(pInetAddress, pId); } - // Nothing to do if reliable indications initialized but not supported, - // go ahead and deliver - if (server.isInitialized() && !server.isRISupported()) return true; - - // Get reliable indication properties from indication - CIMProperty<?> seqCtxProp = pIndication.getProperty("SequenceContext"); - CIMProperty<?> seqNumProp = pIndication.getProperty("SequenceNumber"); - - // Initialize (if not yet done so) to check if indication is reliable + // Initialize if not yet done so if (!server.isInitialized()) { - // Initial indication does not contain reliable indication - // properties, disable support and go ahead and deliver - if (seqCtxProp == null || seqNumProp == null) { - server.initialize(false, null); - - this.iLogger - .trace( - Level.FINE, - "Reliable indication support disabled, initial indication does not contain SequenceContext and SequenceNumber properties"); - - return true; - } - - // Initial indication does not contain reliable indication - // properties with non-null values, disable support and go ahead - // and deliver - if (seqCtxProp.getValue() == null || seqNumProp.getValue() == null) { - server.initialize(false, null); - - this.iLogger - .trace( - Level.FINE, - "Reliable indication support disabled, initial indication does not contain SequenceContext and SequenceNumber properties with non-null values"); - - return true; - } - // Validate DeliveryRetryAttempts property long attempts = this.iSessionProperties.getListenerDeliveryRetryAttempts(); if (attempts <= 0 || attempts > 1000) { @@ -575,42 +534,18 @@ // Create new ReliableIndicationHandler for this // CIMIndicationHandler - server.initialize(true, new ReliableIndicationHandler(this.iDispatcher, attempts - * interval * 10 * 1000)); - - this.iLogger.trace(Level.FINE, - "Reliable indication support enabled, DeliveryRetryAttempts=" + attempts - + ", DeliveryRetryInterval=" + interval); - - // Let ReliableIndicationHandler deliver it - server.getRIHandler().handleIndication(pIndication, seqCtxProp, seqNumProp, pId, - pInetAddress); - return false; - } - - // Reliable indication support is enabled but indication does not - // contain both properties, go ahead and deliver - if (seqCtxProp == null || seqNumProp == null) { - this.iLogger.trace(Level.FINE, - "Reliable indication support enabled but sequence property missing:\n" - + pIndication.toString()); - - return true; - } - - // Reliable indication support is enabled but indication does not - // contain both properties with non-null values, go ahead and deliver - if (seqCtxProp.getValue() == null || seqNumProp.getValue() == null) { - this.iLogger.trace(Level.FINE, - "Reliable indication support enabled but sequence property has null value:\n" - + pIndication.toString()); + server.initialize(new ReliableIndicationHandler(this.iDispatcher, attempts * interval + * 10 * 1000)); - return true; + this.iLogger + .trace(Level.FINE, "Reliable indication support enabled for IP " + + pInetAddress.getHostAddress() + " and URL " + pId + + ", DeliveryRetryAttempts=" + attempts + ", DeliveryRetryInterval=" + + interval); } // Let ReliableIndicationHandler deliver it - server.getRIHandler().handleIndication(pIndication, seqCtxProp, seqNumProp, pId, - pInetAddress); + server.getRIHandler().handleIndication(pIndication, pId, pInetAddress); return false; } --- NEW FILE: RIHandlerTest.txt --- This text file contains Java code that can be inserted into CIMIndicationHandler.java in the dispatchIndications method between the following two lines: CIMInstance indicationInst = (CIMInstance) cimEvent; and: String path = pReader.getMethod().getFile(); This Java code will alter incoming indications to produce out-of-order, duplicate and missing indications as well as context switches and switches from SC/SN on to off and SC/SN off to on. Either Jsr48PegasusIndicationSample or Jsr48SfcbIndicationSample can be used to exercise this Java code, simply alter the samples to: 1) generate 35 indications instead of 1 2) move Thread.sleep(5000) out of loop to end and increase to 30000 3) set sblim.wbem.listenerDeliveryRetryAttempts=1 and sblim.wbem.listenerDeliveryRetryInterval=1 Java code snippet #1 tests just about everything, starting with SC/SN on: CIMProperty<?> seqNumProp = indicationInst.getProperty("SequenceNumber"); Long seqNum = (Long) seqNumProp.getValue(); long seqNumVal = seqNum.longValue(); // 2,3,4 out of order until 5 arrives // 7 missing // 9 duplicate // 11-14 new context, #'s 11-14 // 15-18 null context // 19-24 new context, #'s 0-5 // 25-27 null context // 28+ new context, out of order until 6 arrives String newCtx1 = new String("MyShinyNewContext"); String newCtx2 = new String("MyBrandSpankingShinyNewContext"); String newCtx3 = new String("MyLastAndFinalBrandSpankingShinyNewContext"); if (seqNumVal == 2) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("3")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 3) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("4")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 4) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("5")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 5) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("2")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 7) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("9")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal >= 11 && seqNumVal <= 14) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx1) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal >= 15 && seqNumVal <= 18) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, null) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal >= 19 && seqNumVal <= 24) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx2), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long(seqNumVal - 19)) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal >= 25 && seqNumVal <= 27) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, null) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 28) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("1")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 29) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("0")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 30) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("3")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 31) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("2")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 32) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("5")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 33) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("4")) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal == 34) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, newCtx3), new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long("6")) }; indicationInst = indicationInst.deriveInstance(n); } Java code snippet #2 tests starting with SC/SN off: CIMProperty<?> seqNumProp = indicationInst.getProperty("SequenceNumber"); Long seqNum = (Long) seqNumProp.getValue(); long seqNumVal = seqNum.longValue(); // 0-18 null context // 19-34 new context, #'s 0-16 if (seqNumVal >= 0 && seqNumVal <= 18) { CIMProperty<?> n[] = { new CIMProperty<String>("SequenceContext", CIMDataType.STRING_T, null) }; indicationInst = indicationInst.deriveInstance(n); } else if (seqNumVal >= 19 && seqNumVal <= 34) { CIMProperty<?> n[] = { new CIMProperty<Long>("SequenceNumber", CIMDataType.SINT64_T, new Long(seqNumVal - 19)) }; indicationInst = indicationInst.deriveInstance(n); } Index: ReliableIndicationHandler.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/internal/wbem/indications/ReliableIndicationHandler.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- ReliableIndicationHandler.java 24 Jul 2011 16:47:15 -0000 1.1.2.2 +++ ReliableIndicationHandler.java 8 Feb 2012 15:39:31 -0000 1.1.2.3 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2011 + * (C) Copyright IBM Corp. 2011, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -16,6 +16,7 @@ *------------------------------------------------------------------------------- * 3288721 2011-05-20 blaschke-oss Need the function of indication reordering * 3376657 2011-07-24 blaschke-oss Get reliable indication properties once + * 3484022 2012-02-08 blaschke-oss Turn reliable indication mode on and off based on SC/SN */ package org.sblim.cimclient.internal.wbem.indications; @@ -187,6 +188,8 @@ private long iExpectedSequenceNumber = 0; + private boolean iIsFirstIndication = true; + /** * Constructs a <code>ReliableIndicationHandler</code> instance that uses * the specified event dispatcher and sequence identifier lifetime to handle @@ -331,7 +334,7 @@ } /** - * Adds a reliable indication to the . + * Adds a reliable indication to the sequence identifier cache. * * @param pSequenceContext * Sequence context of reliable indication to be cached. @@ -482,30 +485,52 @@ * Main worker routine for <code>ReliableIndicationHandler</code>. The * indication is either sent directly to the <code>CIMEventDispatcher</code> * or placed in the indication delivery queue to be dispatched later. All - * indications are placed in the sequence identifier cache. + * reliable indications are placed in the sequence identifier cache. * * @param pIndication - * Reliable indication. - * @param pSeqCtxProp - * SequenceContext property. - * @param pSeqNumProp - * SequenceNumber property. + * Indication. * @param pId - * Path portion of reliable indication URL. + * Indication destination URL. * @param pInetAddress - * Host portion of reliable indication URL. + * Indication server IP. */ - public synchronized void handleIndication(CIMInstance pIndication, CIMProperty<?> pSeqCtxProp, - CIMProperty<?> pSeqNumProp, String pId, InetAddress pInetAddress) { + public synchronized void handleIndication(CIMInstance pIndication, String pId, + InetAddress pInetAddress) { // Get current time long arrivalTime = System.currentTimeMillis(); + // Get reliable indication properties from indication + CIMProperty<?> seqCtxProp = pIndication.getProperty("SequenceContext"); + CIMProperty<?> seqNumProp = pIndication.getProperty("SequenceNumber"); + + // At this point indication is reliable or not reliable + + // Indication is not reliable, handle appropriately and deliver + if (seqCtxProp == null || seqNumProp == null || seqCtxProp.getValue() == null + || seqNumProp.getValue() == null) { + // Handle switch from reliable to not reliable + if (this.iLastSequenceContext != null) { + // Deliver all enqueued indications from previous context + flushQueue(); + + this.iLastSequenceContext = null; + this.iLastSequenceNumber = null; + } + + // Deliver indication + this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, pInetAddress)); + this.iIsFirstIndication = false; + return; + } + + // At this point indication is reliable + // Initial indication arrived, save knowledge about sequence identifier // and deliver - if (this.iLastSequenceNumber == null) { + if (this.iIsFirstIndication) { // Remember sequence context/number and arrival time - this.iLastSequenceContext = (String) pSeqCtxProp.getValue(); - this.iLastSequenceNumber = (Long) pSeqNumProp.getValue(); + this.iLastSequenceContext = (String) seqCtxProp.getValue(); + this.iLastSequenceNumber = (Long) seqNumProp.getValue(); this.iExpectedSequenceNumber = this.iLastSequenceNumber.longValue() + 1; // this.iLastArrivalTime = arrivalTime; @@ -515,11 +540,15 @@ // Deliver indication this.iDispatcher.dispatchEvent(new CIMEvent(pIndication, pId, pInetAddress)); + this.iIsFirstIndication = false; return; } - String seqCtx = (String) pSeqCtxProp.getValue(); - Long seqNum = (Long) pSeqNumProp.getValue(); + // At this point indication is reliable and previous indication was + // reliable + + String seqCtx = (String) seqCtxProp.getValue(); + Long seqNum = (Long) seqNumProp.getValue(); long seqNumVal = seqNum.longValue(); // Indication arrived after sequence identifier lifetime of previous @@ -550,7 +579,7 @@ // } // Indication arrived with different sequence context than expected - if (seqCtx.compareTo(this.iLastSequenceContext) != 0) { + if (this.iLastSequenceContext == null || seqCtx.compareTo(this.iLastSequenceContext) != 0) { // Cached sequence context indicates this indication arrived // out-of-order from previous context, log and ignore if (isInCache(seqCtx)) { |
From: Tyrel D. <ty...@us...> - 2012-02-08 00:35:18
|
Update of /cvsroot/sblim/cmpi-base In directory vz-cvs-3.sog:/tmp/cvs-serv5349 Modified Files: Makefile.am NEWS Log Message: Fixed 3424288: Underlinked libcmpiOSBase_ProcessorProvider.so Index: NEWS =================================================================== RCS file: /cvsroot/sblim/cmpi-base/NEWS,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- NEWS 24 May 2011 01:36:29 -0000 1.44 +++ NEWS 8 Feb 2012 00:35:16 -0000 1.45 @@ -1,3 +1,6 @@ +Bugs Fixed: +- 3424288 Underlinked libcmpiOSBase_ProcessorProvider.so + Changes in Version 1.6.2 ======================== Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/cmpi-base/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile.am 25 Jul 2009 00:37:30 -0000 1.17 +++ Makefile.am 8 Feb 2012 00:35:16 -0000 1.18 @@ -93,7 +93,7 @@ cmpiOSBase_ProcessorProvider.c \ cmpiOSBase_Processor.c \ OSBase_Processor.c -libcmpiOSBase_ProcessorProvider_la_LIBADD = -lcmpiOSBase_Common +libcmpiOSBase_ProcessorProvider_la_LIBADD = -lcmpiOSBase_Common -lpthread libcmpiOSBase_ProcessorProvider_la_LDFLAGS = -avoid-version # Base Board |
From: Dave B. <bla...@us...> - 2012-02-07 03:15:31
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv13438/src/org/sblim/cimclient Modified Files: Tag: Experimental WBEMConfigurationProperties.java Log Message: 3485074 - An Indication trace request Index: WBEMConfigurationProperties.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/WBEMConfigurationProperties.java,v retrieving revision 1.17.2.26 retrieving revision 1.17.2.27 diff -u -d -r1.17.2.26 -r1.17.2.27 --- WBEMConfigurationProperties.java 13 Dec 2011 18:45:22 -0000 1.17.2.26 +++ WBEMConfigurationProperties.java 7 Feb 2012 03:15:28 -0000 1.17.2.27 @@ -1,5 +1,5 @@ /** - * (C) Copyright IBM Corp. 2006, 2011 + * (C) Copyright IBM Corp. 2006, 2012 * * THIS FILE IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC LICENSE * ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE @@ -34,6 +34,7 @@ * 3206904 2011-05-03 blaschke-oss Indication listener deadlock causes JVM to run out sockets * 3288721 2011-05-20 blaschke-oss Need the function of indication reordering * 3459036 2011-12-13 blaschke-oss Linked list for RI queue not efficient for many LDs + * 3485074 2012-02-06 blaschke-oss An Indication trace request */ package org.sblim.cimclient; @@ -817,4 +818,30 @@ */ public static final String LISTENER_RELIABLE_INDICATION_HASHTABLE_CAPACITY = "sblim.wbem.listenerReliableIndicationHashtableCapacity"; + /** + * <pre> + * The filter to use for tracing of incoming indications at the FINE level. + * + * If string is empty, no tracing of incoming indications will occur. If + * string is not empty, it identifies one or more properties to be included + * in the trace of all incoming indications. An optional class can be used + * to filter the output to include only those indications that contain the + * substring. For example, to trace the SequenceContext and SequenceNumber + * properties of all alerts, use the following: + * + * alert:sequencecontext,sequencenumber + * + * To trace the IndicationTime of all indications, use the following: + * + * indicationtime + * + * Note: This property has no effect unless tracing is enabled. See the + * sblim.wbem.traceFileLevel property. + * + * Type: String + * Recognition: On next creation of WBEMListener + * Format: [class:]property[,property]* + * </pre> + */ + public static final String LISTENER_INDICATION_TRACE_FILTER = "sblim.wbem.listener.IndicationTraceFilter"; } |
From: Dave B. <bla...@us...> - 2012-02-07 03:15:30
|
Update of /cvsroot/sblim/jsr48-client In directory vz-cvs-3.sog:/tmp/cvs-serv13438 Modified Files: Tag: Experimental sblim-cim-client2.properties Log Message: 3485074 - An Indication trace request Index: sblim-cim-client2.properties =================================================================== RCS file: /cvsroot/sblim/jsr48-client/sblim-cim-client2.properties,v retrieving revision 1.1.2.26 retrieving revision 1.1.2.27 diff -u -d -r1.1.2.26 -r1.1.2.27 --- sblim-cim-client2.properties 13 Dec 2011 19:32:22 -0000 1.1.2.26 +++ sblim-cim-client2.properties 7 Feb 2012 03:15:28 -0000 1.1.2.27 @@ -645,3 +645,27 @@ # Default: 0 # #sblim.wbem.listenerReliableIndicationHashtableCapacity=0 + +# The filter to use for tracing of incoming indications at the FINE level. +# +# If string is empty, no tracing of incoming indications will occur. If +# string is not empty, it identifies one or more properties to be included +# in the trace of all incoming indications. An optional class can be used +# to filter the output to include only those indications that contain the +# substring. For example, to trace the SequenceContext and SequenceNumber +# properties of all alerts, use the following: +# +# alert:sequencecontext,sequencenumber +# +# To trace the IndicationTime of all indications, use the following: +# +# indicationtime +# +# Note: This property has no effect unless tracing is enabled. See the +# sblim.wbem.traceFileLevel property. +# +# Type: String +# Recognition: On next creation of WBEMListener +# Format: [class:]property[,property]* +# +#sblim.wbem.listener.IndicationTraceFilter= \ No newline at end of file |
From: Dave B. <bla...@us...> - 2012-02-06 22:07:58
|
Update of /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient In directory vz-cvs-3.sog:/tmp/cvs-serv5163/src/org/sblim/cimclient Modified Files: Tag: Experimental WBEMListenerSBLIM.java Added Files: Tag: Experimental IndicationListenerSBLIM.java Log Message: 3477087 - Need Access to an Indication Sender's IP Address Index: WBEMListenerSBLIM.java =================================================================== RCS file: /cvsroot/sblim/jsr48-client/src/org/sblim/cimclient/WBEMListenerSBLIM.java,v retrieving revision 1.5.2.9 retrieving revision 1.5.2.10 diff -u -d -r1.5.2.9 -r1.5.2.10 --- WBEMListenerSBLIM.java 3 Jan 2012 16:33:56 -0000 1.5.2.9 +++ WBEMListenerSBLIM.java 6 Feb 2012 22:07:56 -0000 1.5.2.10 @@ -22,12 +22,14 @@ * 3023348 2010-07-02 blaschke-oss Listener uses # constructor instead of valueOf * 3400209 2011-08-31 blaschke-oss Highlighted Static Analysis (PMD) issues * 3469018 2012-01-03 blaschke-oss Properties not passed to CIMIndicationHandler + * 3477087 2012-01-23 blaschke-oss Need Access to an Indication Sender's IP Address */ package org.sblim.cimclient; import java.io.IOException; import java.net.BindException; +import java.util.EventListener; import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -56,7 +58,7 @@ */ public static class WBEMListenerImpl { - private IndicationListener iIndicationListener; + private EventListener iIndicationListener; private HttpServerConnection iConnection; @@ -66,24 +68,27 @@ * @param pLocalAddress * The local address to bind the port to. If null the port is * bound to all local addresses. For use on multi-homed - * systems - * + * systems. * @param pPort * The port to listen on. If zero any free port will be * chosen. * @param pSSL - * SSL secured connection ? + * SSL secured connection? * @param pIndicationListener * The indication listener to forward the incoming - * indications to + * indications to (an instance of IndicationListener or + * IndicationListenerSBLIM). * @param pProperties - * The configuration + * The configuration. * @throws IOException */ public WBEMListenerImpl(String pLocalAddress, int pPort, boolean pSSL, - IndicationListener pIndicationListener, Properties pProperties) throws IOException { + EventListener pIndicationListener, Properties pProperties) throws IOException { WBEMConfiguration config = (pProperties != null ? new WBEMConfiguration(pProperties) : WBEMConfiguration.getGlobalConfiguration()); + if (!(pIndicationListener instanceof IndicationListener) + && !(pIndicationListener instanceof IndicationListenerSBLIM)) throw new IllegalArgumentException( + "Listener must be instance of IndicationListener or IndicationListenerSBLIM"); this.iIndicationListener = pIndicationListener; CIMEventDispatcher eventDispatcher = new CIMEventDispatcher(this.iIndicationListener); CIMIndicationHandler indicationHandler = new CIMIndicationHandler(eventDispatcher, @@ -100,32 +105,43 @@ } /** - * start + * Starts the HTTP server connection receiving the indications. */ public void start() { this.iConnection.start(); } /** - * stop + * Stops the HTTP server connection receiving the indications. */ public void stop() { this.iConnection.close(); } /** - * Returns the listener we forward the indications to + * Returns the listener we forward the indications to. * - * @return The listener + * @return The listener. */ public IndicationListener getIndicationListener() { - return this.iIndicationListener; + return (this.iIndicationListener instanceof IndicationListener) ? (IndicationListener) this.iIndicationListener + : null; } /** - * Returns the listener port + * Returns the listener we forward the indications to. * - * @return The listener port + * @return The listener. + */ + public IndicationListenerSBLIM getIndicationListenerSBLIM() { + return (this.iIndicationListener instanceof IndicationListenerSBLIM) ? (IndicationListenerSBLIM) this.iIndicationListener + : null; + } + + /** + * Returns the listener port. + * + * @return The listener port. */ public int getListenerPort() { return this.iConnection.getPort(); @@ -161,7 +177,7 @@ */ public int addListener(IndicationListener pListener, int pPort, String pTransport) throws IOException { - return addListener(pListener, pPort, pTransport, null, null); + return addListener((EventListener) pListener, pPort, pTransport, null, null); } /* @@ -172,30 +188,130 @@ */ public int addListener(IndicationListener pListener, int pPort, String pTransport, String pLocalAddr) throws IOException { - return addListener(pListener, pPort, pTransport, pLocalAddr, null); + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, null); } /** * Add a new listener using the specified port. * * @param pListener - * - The Indication Listener that will be called when an + * The Indication Listener that will be called when an indication + * is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @param pConfigurationProperties + * The individual configuration properties for this listener. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListener pListener, int pPort, String pTransport, + String pLocalAddr, Properties pConfigurationProperties) throws IOException { + + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, + pConfigurationProperties); + } + + /** + * Add a new listener using the specified port. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an * indication is received. * @param pPort - * - The port to listen on. Use 0 to specify any available port. + * The port to listen on. Use 0 to specify any available port. * @param pTransport - * - The transport to use (e.g. HTTP or HTTPS). + * The transport to use (e.g. HTTP or HTTPS). + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport) + throws IOException { + return addListener((EventListener) pListener, pPort, pTransport, null, null); + } + + /** + * Add a new listener using the specified port and local address. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an + * indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). * @param pLocalAddr - * - The local IP address to bind to. This is only needed in + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, + String pLocalAddr) throws IOException { + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, null); + } + + /** + * Add a new listener using the specified port, local address and + * properties. + * + * @param pListener + * The SBLIM Indication Listener that will be called when an + * indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in * multi-homed systems. A value of <code>null</code> will bind to * all IP addresses. * @param pConfigurationProperties - * - The individual configuration properties for this listener + * The individual configuration properties for this listener. * @return The port that was used. * @throws IOException - * - This exception is thrown when binding to pPort fails. + * This exception is thrown when binding to pPort fails. */ - public synchronized int addListener(IndicationListener pListener, int pPort, String pTransport, + public int addListener(IndicationListenerSBLIM pListener, int pPort, String pTransport, + String pLocalAddr, Properties pConfigurationProperties) throws IOException { + + return addListener((EventListener) pListener, pPort, pTransport, pLocalAddr, + pConfigurationProperties); + } + + /** + * Add a new listener using the specified port, local address and + * properties. This is the worker routine for all public addListener + * methods. + * + * @param pListener + * The indication listener (<code>IndicationListener</code> or + * <code>IndicationListenerSBLIM</code>) that will be called when + * an indication is received. + * @param pPort + * The port to listen on. Use 0 to specify any available port. + * @param pTransport + * The transport to use (e.g. HTTP or HTTPS). + * @param pLocalAddr + * The local IP address to bind to. This is only needed in + * multi-homed systems. A value of <code>null</code> will bind to + * all IP addresses. + * @param pConfigurationProperties + * The individual configuration properties for this listener. + * @return The port that was used. + * @throws IOException + * This exception is thrown when binding to pPort fails. + */ + private synchronized int addListener(EventListener pListener, int pPort, String pTransport, String pLocalAddr, Properties pConfigurationProperties) throws IOException { if (pPort > 0 && this.iPortMap.containsKey(Integer.valueOf(pPort))) { throw new BindException( --- NEW FILE: IndicationListenerSBLIM.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, IBM, a.w...@de... * @author : Dave Blaschke, IBM, bla...@us... * * Change History * Flag Date Prog Description *------------------------------------------------------------------------------- * 3477087 2012-01-23 blaschke-oss Need Access to an Indication Sender's IP Address */ package org.sblim.cimclient; import java.net.InetAddress; import java.util.EventListener; import javax.cim.CIMInstance; /** * This interface is implemented by the code that wants to create a listener for * indications. See the <code>WBEMListenerFactory</code> class for an example. * * The difference between this interface and <code>IndicationListener</code> is * that the JSR48 standard (<code>javax.wbem.listener.IndicationListener</code>) * does not allow for the listener to receive the IP of the indication sender * whereas this internal interface ( * <code>org.sblim.cimclinet.IndicationListenerSBLIM</code>) does. */ public interface IndicationListenerSBLIM extends EventListener { /** * Called when an indication has been received by the listener * * @param pIndicationURL * The URL to which the indication was posted. For example if the * indication was delivered over the https protocol to the * destination listener https://hostname:6111/, pIndicationURL * would be set to https://hostname:6111/. * @param pIndication * The indication received. * @param pSenderIP * The internet address of the indication sender. */ public void indicationOccured(String pIndicationURL, CIMInstance pIndication, InetAddress pSenderIP); } |