From: Chris B. <buc...@us...> - 2011-02-23 23:18:43
|
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 d8eae00ac5f762d2c1407d6a2ce99c64958febac (commit) from 0ae4e474a4f4f45c0b6ca0ae1db848ff492a269b (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 d8eae00ac5f762d2c1407d6a2ce99c64958febac Author: buccella <buc...@li...> Date: Wed Feb 23 18:18:48 2011 -0500 [ 3175770 ] execQuery returns multiple instances of same object ----------------------------------------------------------------------- Summary of changes: diff --git a/ChangeLog b/ChangeLog index d0da56d..75e162d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-23 Chris Buccella <buc...@li...> + + * providerDrv.c: + [ 3175770 ] execQuery returns multiple instances of same object + 2011-01-13 Michael Chase-Salerno <br...@li...> * ABTScript: diff --git a/NEWS b/NEWS index 06013a9..b1f15d6 100644 --- a/NEWS +++ b/NEWS @@ -63,6 +63,7 @@ Bugs fixed: - 3054618 mofpp is overaggressive when detecting comments - 3172080 deliverIndication does not check for matching FROM classes - 3185178 Wrong classname for returned instances from execQuery +- 3175770 execQuery returns multiple instances of same object Changes in 1.3.10 ================= diff --git a/providerDrv.c b/providerDrv.c index 0eccaa9..36ed3cf 100644 --- a/providerDrv.c +++ b/providerDrv.c @@ -100,6 +100,21 @@ char *opsName[]; #define PROVIDERLOAD_DLFLAG (RTLD_NOW | RTLD_GLOBAL) #endif +#ifndef HAVE_OPTIMIZED_ENUMERATION + /* not a special provider, perform class name substitution if call is for a + parent class of the class the provider is registered for */ +#define REPLACE_CN(info,path) \ + if (info->className && info->className[0] != '$') { \ + char * classname = CMGetCharPtr(CMGetClassName(path,NULL)); \ + char * namespace = CMGetCharPtr(CMGetNameSpace(path,NULL)); \ + if (classname && namespace && strcasecmp(info->className,classname)) { \ + CMPIObjectPath * provPath = CMNewObjectPath(Broker,namespace,info->className,NULL); \ + if (provPath && CMClassPathIsA(Broker,provPath,classname,NULL)) { \ + _SFCB_TRACE(1, ("--- Replacing class name %s",info->className)); \ + path = provPath; \ + } } } +#endif + extern CMPIBroker *Broker; extern unsigned long exFlags; @@ -2036,22 +2051,7 @@ enumInstances(BinRequestHdr * hdr, ProviderInfo * info, int requestor) char **props = NULL; #ifndef HAVE_OPTIMIZED_ENUMERATION - if (info->className && info->className[0] != '$') { - /* - * not a special provider, perform class name substitution if call is - * for a parent class of the class the provider is registered for - */ - char *classname = CMGetCharPtr(CMGetClassName(path, NULL)); - char *namespace = CMGetCharPtr(CMGetNameSpace(path, NULL)); - if (classname && namespace && strcasecmp(info->className, classname)) { - CMPIObjectPath *provPath = - CMNewObjectPath(Broker, namespace, info->className, NULL); - if (provPath && CMClassPathIsA(Broker, provPath, classname, NULL)) { - _SFCB_TRACE(1, ("--- Replacing class name %s", info->className)); - path = provPath; - } - } - } + REPLACE_CN(info,path); #endif if (req->hdr.flags & FL_localOnly) @@ -2108,22 +2108,7 @@ enumInstanceNames(BinRequestHdr * hdr, ProviderInfo * info, int requestor) CMPIFlags flgs = 0; #ifndef HAVE_OPTIMIZED_ENUMERATION - if (info->className && info->className[0] != '$') { - /* - * not a special provider, perform class name substitution if call is - * for a parent class of the class the provider is registered for - */ - char *classname = CMGetCharPtr(CMGetClassName(path, NULL)); - char *namespace = CMGetCharPtr(CMGetNameSpace(path, NULL)); - if (classname && namespace && strcasecmp(info->className, classname)) { - CMPIObjectPath *provPath = - CMNewObjectPath(Broker, namespace, info->className, NULL); - if (provPath && CMClassPathIsA(Broker, provPath, classname, NULL)) { - _SFCB_TRACE(1, ("--- Replacing class name %s", info->className)); - path = provPath; - } - } - } + REPLACE_CN(info,path); #endif ctx->ft->addEntry(ctx, CMPIInvocationFlags, (CMPIValue *) & flgs, @@ -2262,6 +2247,10 @@ execQuery(BinRequestHdr * hdr, ProviderInfo * info, int requestor) _SFCB_RETURN(resp); } +#ifndef HAVE_OPTIMIZED_ENUMERATION + REPLACE_CN(info,path); +#endif + qs->propSrc.getValue = queryGetValue; qs->propSrc.sns = qs->sns; // qs->cop=CMNewObjectPath(Broker,"*",qs->fClasses[0],NULL); hooks/post-receive -- SFCB - Small Footprint CIM Broker |