From: Adrian S. <a3s...@us...> - 2005-05-31 09:23:59
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18971 Modified Files: brokerUpc.c Log Message: Fixed [ 1206682 ] change error when delete indication handler in use Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- brokerUpc.c 9 Mar 2005 12:25:09 -0000 1.1.1.1 +++ brokerUpc.c 31 May 2005 09:23:50 -0000 1.2 @@ -143,6 +143,16 @@ #endif } +void buildStatus(BinResponseHdr *resp, CMPIStatus *st) +{ + if (st==NULL) return; + st->rc=resp->rc; + if (resp->rc && resp->count==1 && resp->object[0].type==MSG_SEG_CHARS && resp->object[0].length) { + st->msg=native_new_CMPIString((char*)resp->object[0].data,NULL); + } + else st->msg=NULL; +} + //--------------------------------------------------- //--- //- Instance support @@ -292,7 +302,7 @@ resp = invokeProvider(&binCtx); closeProviderContext(&binCtx); resp->rc--; - st.rc = resp->rc; + buildStatus(resp,&st); if (resp->rc == CMPI_RC_OK) { inst = relocateSerializedInstance(resp->object[0].data); tInst=inst->ft->clone(inst,NULL); @@ -358,7 +368,7 @@ resp = invokeProvider(&binCtx); closeProviderContext(&binCtx); resp->rc--; - st.rc = resp->rc; + buildStatus(resp,&st); if (resp->rc == CMPI_RC_OK) { op = relocateSerializedObjectPath(resp->object[0].data); tOp=op->ft->clone(op,NULL); @@ -428,7 +438,7 @@ resp = invokeProvider(&binCtx); closeProviderContext(&binCtx); resp->rc--; - st.rc = resp->rc; + buildStatus(resp,&st); if (resp->rc == CMPI_RC_OK) { free(resp); } @@ -479,7 +489,7 @@ resp = invokeProvider(&binCtx); closeProviderContext(&binCtx); resp->rc--; - st.rc = resp->rc; + buildStatus(resp,&st); if (resp->rc == CMPI_RC_OK) { free(resp); } @@ -830,7 +840,7 @@ closeProviderContext(&binCtx); resp->rc--; - if (rc) st.rc = resp->rc; + buildStatus(resp,&st); if (resp->rc == CMPI_RC_OK) { if (out) { tOut = relocateSerializedArgs(resp->object[0].data); |