|
|
|
|
|
|
|
|
|
|
xen-cim
Re: [Xen-cim] Provider Initialize functions
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
|
|
|
|
|