From: Adrian S. <a3s...@us...> - 2005-07-15 15:02:05
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15323 Modified Files: cimXmlGen.c cimXmlGen.h cimXmlOps.y cimXmlRequest.c objectImpl.c Log Message: Fixed [ 1223687 ] getclass ignore IncludeQualifier flag Index: cimXmlOps.y =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlOps.y,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- cimXmlOps.y 21 May 2005 21:39:21 -0000 1.6 +++ cimXmlOps.y 15 Jul 2005 15:01:55 -0000 1.7 @@ -47,15 +47,6 @@ extern int yylex (void *lvalp, ParserControl *parm); -int isBoolean(CMPIData data) -{ - if (data.type==CMPI_chars) { - if (strcasecmp(data.value.chars,"true")==0) return 0xffff; - if (strcasecmp(data.value.chars,"false")==0) return 0; - } - return -1; -} - static void setRequest(void *parm, void *req, unsigned long size, int type) { ((ParserControl*)parm)->reqHdr.cimRequestLength=size; @@ -2099,8 +2090,8 @@ boolValue : XTOK_VALUE ZTOK_VALUE { -// int b=isBoolean($1.val); -// if (b>=0) $$=(b!=0); + if (strcasecmp($1.value,"true")==0) $$=1; + if (strcasecmp($1.value,"false")==0) $$=0; } ; Index: cimXmlGen.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlGen.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- cimXmlGen.c 13 Jul 2005 14:26:01 -0000 1.11 +++ cimXmlGen.c 15 Jul 2005 15:01:54 -0000 1.12 @@ -645,7 +645,8 @@ sb->ft->appendChars(sb, superCls); } sb->ft->appendChars(sb, "\">\n"); - quals2xml(cl->quals, sb); + if (flags & FL_includeQualifiers) quals2xml(cl->quals, sb); + if (flags & FL_includeQualifiers) for (i = 0, m = ClClassGetQualifierCount(cl); i < m; i++) { data = cls->ft->getQualifierAt(cls, i, &name, NULL); @@ -655,7 +656,7 @@ for (i = 0, m = ClClassGetPropertyCount(cl); i < m; i++) { qsb->ft->reset(qsb); data = cls->ft->getPropertyAt(cls, i, &name, &quals, NULL); - quals2xml(quals << 8, qsb); + if (flags & FL_includeQualifiers) quals2xml(quals << 8, qsb); if (flags & FL_includeQualifiers) for (q = 0, qm = ClClassGetPropQualifierCount(cl, i); q < qm; q++) { qdata = cls->ft->getPropQualifierAt(cls, i, q, &qname, NULL); @@ -711,7 +712,7 @@ _SFCB_RETURN(0); } -int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb) +int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb, unsigned int flags) { ClInstance *inst = (ClInstance *) ci->hdl; int i, m = ClInstanceGetPropertyCount(inst); @@ -723,6 +724,8 @@ sb->ft->appendChars(sb, "<INSTANCE CLASSNAME=\""); sb->ft->appendChars(sb, instGetClassName(ci)); sb->ft->appendChars(sb, "\">\n"); + + if (flags & FL_includeQualifiers) quals2xml(inst->quals, sb); for (i = 0; i < m; i++) { CMPIString *name; @@ -873,7 +876,7 @@ instanceName2xml(cop, sb); if (xmlAs==XML_asObj) sb->ft->appendChars(sb, "</INSTANCEPATH>\n"); - instance2xml(ci, sb); + instance2xml(ci, sb, flags); if (xmlAs==XML_asObj) sb->ft->appendChars(sb, "</VALUE.OBJECTWITHPATH>\n"); else Index: objectImpl.c =================================================================== RCS file: /cvsroot/sblim/sfcb/objectImpl.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- objectImpl.c 13 Jul 2005 14:26:02 -0000 1.9 +++ objectImpl.c 15 Jul 2005 15:01:55 -0000 1.10 @@ -1142,7 +1142,7 @@ return sc->str + o; } -int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb); +int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb, unsigned int flags); static long sizeProperties(ClObjectHdr * hdr, ClSection * s) { @@ -1156,7 +1156,7 @@ if ((p->flags & ClProperty_EmbeddedObjectAsString)==0) { p->flags|=ClProperty_EmbeddedObjectAsString; sb = UtilFactory->newStrinBuffer(1024); - instance2xml(p->data.value.inst,sb); + instance2xml(p->data.value.inst,sb,0); p->data.value.dataPtr.length = addClString(hdr, sb->ft->getCharPtr(sb)); sb->ft->release(sb); } Index: cimXmlGen.h =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlGen.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cimXmlGen.h 12 Mar 2005 00:43:00 -0000 1.1 +++ cimXmlGen.h 15 Jul 2005 15:01:55 -0000 1.2 @@ -42,7 +42,7 @@ extern int value2xml(CMPIData d, UtilStringBuffer * sb, int wv); extern int instanceName2xml(CMPIObjectPath * cop, UtilStringBuffer * sb); extern int cls2xml(CMPIConstClass * cls, UtilStringBuffer * sb, unsigned int flags); -extern int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb); +extern int instance2xml(CMPIInstance * ci, UtilStringBuffer * sb, unsigned int flags); extern int args2xml(CMPIArgs * args, UtilStringBuffer * sb); extern int enum2xml(CMPIEnumeration * enm, UtilStringBuffer * sb, CMPIType type, int xmlAs, unsigned int flags); Index: cimXmlRequest.c =================================================================== RCS file: /cvsroot/sblim/sfcb/cimXmlRequest.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- cimXmlRequest.c 13 Jul 2005 14:26:02 -0000 1.14 +++ cimXmlRequest.c 15 Jul 2005 15:01:55 -0000 1.15 @@ -378,7 +378,7 @@ {0, exportIndTrailer1}} }; _SFCB_ENTER(TRACE_CIMXMLPROC, "exportIndicationReq"); - instance2xml(ci, sb); + instance2xml(ci, sb, 0); _SFCB_RETURN(xs); }; @@ -545,7 +545,7 @@ if (resp->rc == CMPI_RC_OK) { cls = relocateSerializedConstClass(resp->object[0].data); sb = UtilFactory->newStrinBuffer(1024); - cls2xml(cls, sb,binCtx.bHdr->flags); + cls2xml(cls, sb, binCtx.bHdr->flags); _SFCB_RETURN(iMethodResponse(hdr, sb)); } _SFCB_RETURN(iMethodErrResponse(hdr, getErrSegment(resp->rc, @@ -898,7 +898,7 @@ if (resp->rc == CMPI_RC_OK) { inst = relocateSerializedInstance(resp->object[0].data); sb = UtilFactory->newStrinBuffer(1024); - instance2xml(inst, sb); + instance2xml(inst, sb, binCtx.bHdr->flags); rsegs=iMethodResponse(hdr, sb); _SFCB_RETURN(rsegs); } |