WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-cim

Re: [Xen-cim] Provider Initialize functions

To: Gareth S Bestor <bestor@xxxxxxxxxx>
Subject: Re: [Xen-cim] Provider Initialize functions
From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Date: Tue, 25 Apr 2006 16:44:33 -0600
Cc: xen-cim@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 25 Apr 2006 15:44:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <OFE483361D.98EE85D9-ON8825715B.000214ED-8825715B.00038BA7@xxxxxxxxxx>
List-help: <mailto:xen-cim-request@lists.xensource.com?subject=help>
List-id: xen-cim mailing list <xen-cim.lists.xensource.com>
List-post: <mailto:xen-cim@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-cim>, <mailto:xen-cim-request@lists.xensource.com?subject=unsubscribe>
References: <OFE483361D.98EE85D9-ON8825715B.000214ED-8825715B.00038BA7@xxxxxxxxxx>
Sender: xen-cim-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Gareth S Bestor wrote:

The inclusion of the Initialize function is not needed by most of the classes - I had included it in the LTC Xen CIM provider more for future flexibility should the need ever arise, hence most of the initialize routines do little more than print the input params to tracing. The ctx param is passed in via the addition of the (optional) provider initialize routine in the CM*MIStub macro, which in turn is defined (with ctx) in your cmpimacs.h:


Right. I think this is a bug in openwbem but I'm not familiar with the cmpi provider interface code in openwbem. I have turned it over to one of the openwbem developers in hopes he will find the bug before I waste more time on it :-)

openwbem stashes some thread context object in thread local storage but doesn't seem to have done it yet when the initialize routine is called. No problem with the same code path on post-initialize routines, e.g. EnumInstances.

I am planning to include the workaround in my patch so those with an unpatched openwbem can use the providers.


Note - the CMGetCharPtr() macro is actually redefined in cmpiutil.h to better handle the case when CMPIString objects are null, which always used to cause a crash - are you sure you are picking up the redefined one in cmpiutil.h?


Yes, in fact I changed it to

#ifdef CMGetCharPtr
# undef CMGetCharPtr
# define CMGetCharPtr(s) (((s)==NULL || *((void**)(s))==NULL)? NULL : (char*)s->hdl)
#endif

to remove compiler warnings about already being defined.

Jim


_______________________________________________
Xen-cim mailing list
Xen-cim@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-cim

<Prev in Thread] Current Thread [Next in Thread>