|
From: Chris B. <buc...@us...> - 2010-10-28 00:20:13
|
Update of /cvsroot/sblim/sfcb In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv27970 Modified Files: interopProvider.c indCIMXMLHandler.c ChangeLog NEWS Log Message: [ 3095884 ] Indication classes missing SystemName Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.556 retrieving revision 1.557 diff -u -d -r1.556 -r1.557 --- NEWS 14 Oct 2010 20:59:56 -0000 1.556 +++ NEWS 28 Oct 2010 00:20:05 -0000 1.557 @@ -4,6 +4,7 @@ Bugs fixed: - 3086143 set cmpi status in getPropQualifier - 3086145 check datetime format in chars2bin +- 3095884 Indication classes missing SystemName Changes in 1.3.9 ================ Index: indCIMXMLHandler.c =================================================================== RCS file: /cvsroot/sblim/sfcb/indCIMXMLHandler.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- indCIMXMLHandler.c 1 Jul 2010 18:59:26 -0000 1.31 +++ indCIMXMLHandler.c 28 Oct 2010 00:20:05 -0000 1.32 @@ -232,6 +232,16 @@ } CMPIInstance* ciLocal = CMClone(ci, NULL); + CMPIObjectPath* copLocal = CMClone(cop, NULL); + + CMPIString *sysname=ciLocal->ft->getProperty(ciLocal,"SystemName",&st).value.string; + if (sysname == NULL || sysname->hdl == NULL) { + char hostName[512]; + hostName[0]=0; + gethostname(hostName,511); /* should be the same as SystemName of IndicationService */ + CMAddKey(copLocal, "SystemName", hostName, CMPI_chars); + CMSetProperty(ciLocal,"SystemName",hostName,CMPI_chars); + } CMPIString* dest = CMGetProperty(ciLocal, "destination", &st).value.string; if (dest == NULL || CMGetCharPtr(dest) == NULL) { @@ -266,24 +276,25 @@ } CMSetProperty(ciLocal, "persistencetype", &persistenceType, CMPI_uint16); - CMPIString *str=CDToString(_broker,cop,NULL); - CMPIString *ns=CMGetNameSpace(cop,NULL); + CMPIString *str=CDToString(_broker,copLocal,NULL); + CMPIString *ns=CMGetNameSpace(copLocal,NULL); _SFCB_TRACE(1,("--- handler %s %s",(char*)ns->hdl,(char*)str->hdl)); in=CMNewArgs(_broker,NULL); CMAddArg(in,"handler",&ciLocal,CMPI_instance); - CMAddArg(in,"key",&cop,CMPI_ref); + CMAddArg(in,"key",&copLocal,CMPI_ref); op=CMNewObjectPath(_broker,"root/interop","cim_indicationsubscription",&st); rv=CBInvokeMethod(_broker,ctx,op,"_addHandler",in,out,&st); if (st.rc==CMPI_RC_OK) { - st=InternalProviderCreateInstance(NULL,ctx,rslt,cop,ciLocal); + st=InternalProviderCreateInstance(NULL,ctx,rslt,copLocal,ciLocal); } else { rv=CBInvokeMethod(_broker,ctx,op,"_removeHandler",in,out,NULL); } CMRelease(ciLocal); + CMRelease(copLocal); _SFCB_RETURN(st); } Index: interopProvider.c =================================================================== RCS file: /cvsroot/sblim/sfcb/interopProvider.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- interopProvider.c 25 Aug 2010 22:00:16 -0000 1.44 +++ interopProvider.c 28 Oct 2010 00:20:05 -0000 1.45 @@ -889,6 +889,18 @@ CMSetStatus(&st, CMPI_RC_OK); } + /* SystemName is a key property. According to DSP1054, the CIMOM must + provide this if the client does not */ + CMPIString *sysname=ciLocal->ft->getProperty(ciLocal,"SystemName",&st).value.string; + if (sysname == NULL || sysname->hdl == NULL) { + char hostName[512]; + hostName[0]=0; + gethostname(hostName,511); /* should be the same as SystemName of IndicationService */ + CMAddKey(copLocal, "SystemName", hostName, CMPI_chars); + CMSetProperty(ciLocal,"SystemName",hostName,CMPI_chars); + } + + for (ql=(char*)lang->hdl,i=0,n=0,m=strlen(ql); i<m; i++) { if (ql[i]>' ') lng[n++]=ql[i]; if (n>=15) break; @@ -901,7 +913,7 @@ _SFCB_RETURN(st); } - key=normalizeObjectPathCharsDup(cop); + key=normalizeObjectPathCharsDup(copLocal); if (getFilter(key)) { free(key); setStatus(&st,CMPI_RC_ERR_ALREADY_EXISTS,NULL); Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.629 retrieving revision 1.630 diff -u -d -r1.629 -r1.630 --- ChangeLog 14 Oct 2010 20:59:56 -0000 1.629 +++ ChangeLog 28 Oct 2010 00:20:05 -0000 1.630 @@ -1,3 +1,8 @@ +2010-10-27 Chris Buccella <buc...@li...> + + * interopProvider.c, indCIMXMLHandler.c: + [ 3095884 ] Indication classes missing SystemName + 2010-10-14 Chris Buccella <buc...@li...> * constClass.c: |