221
222
memset(binCtx,0,sizeof(BinRequestContext));
222
223
oHdr->nameSpace = setCharsMsgSegment((char *)
223
224
ClObjectPathGetNameSpace((ClObjectPath *) cop->hdl));
224
oHdr->className = setCharsMsgSegment((char *)
225
if (oHdr->type < OPS_Associators || oHdr->type > OPS_ReferenceNames) {
226
oHdr->className = setCharsMsgSegment((char *)
225
227
ClObjectPathGetClassName((ClObjectPath *) cop->hdl));
229
oHdr->className = setCharsMsgSegment(NULL);
226
231
ctxData=CMGetContextEntry(ctx,CMPIPrincipal,NULL);
227
232
if (ctxData.value.string) {
228
233
bHdr->object[0] = setCharsMsgSegment(CMGetCharPtr(ctxData.value.string));
380
387
if (pInfo->initialized == 0) {
381
initProvider(pInfo,binCtx.bHdr->sessionId);
384
case OPS_Associators:
385
rci = pInfo->associationMI->ft->associators(pInfo->associationMI,
386
context, result, copLocalCall, assocclass,
387
resultclass, role, resultrole, props);
389
case OPS_AssociatorNames:
390
rci = pInfo->associationMI->ft->associatorNames(pInfo->associationMI,
391
context, result, copLocalCall, assocclass,
392
resultclass, role, resultrole);
395
rci = pInfo->associationMI->ft->references(pInfo->associationMI,
396
context, result, copLocalCall, resultclass,
399
case OPS_ReferenceNames:
400
rci = pInfo->associationMI->ft->referenceNames(pInfo->associationMI,
401
context, result, copLocalCall, resultclass, role);
403
case OPS_EnumerateInstances:
404
rci = pInfo->instanceMI->ft->enumerateInstances(pInfo->instanceMI,
405
context, result, copLocalCall, props);
407
case OPS_EnumerateInstanceNames:
408
rci = pInfo->instanceMI->ft->enumerateInstanceNames(pInfo->instanceMI,
409
context, result, copLocalCall);
388
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
391
rci.msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
394
rci.rc = CMPI_RC_ERR_FAILED;
398
case OPS_Associators:
399
rci = pInfo->associationMI->ft->associators(pInfo->associationMI,
400
context, result, copLocalCall, assocclass,
401
resultclass, role, resultrole, props);
403
case OPS_AssociatorNames:
404
rci = pInfo->associationMI->ft->associatorNames(pInfo->associationMI,
405
context, result, copLocalCall, assocclass,
406
resultclass, role, resultrole);
409
rci = pInfo->associationMI->ft->references(pInfo->associationMI,
410
context, result, copLocalCall, resultclass,
413
case OPS_ReferenceNames:
414
rci = pInfo->associationMI->ft->referenceNames(pInfo->associationMI,
415
context, result, copLocalCall, resultclass, role);
417
case OPS_EnumerateInstances:
418
rci = pInfo->instanceMI->ft->enumerateInstances(pInfo->instanceMI,
419
context, result, copLocalCall, props);
421
case OPS_EnumerateInstanceNames:
422
rci = pInfo->instanceMI->ft->enumerateInstanceNames(pInfo->instanceMI,
423
context, result, copLocalCall);
412
427
lockUpCall(broker);
413
428
if (rci.rc == CMPI_RC_OK) cpyResult(result, ar, &c);
494
511
unlockUpCall(broker);
495
512
if (pInfo->initialized == 0) {
496
initProvider(pInfo,binCtx.bHdr->sessionId);
513
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
517
rc->rc = CMPI_RC_ERR_FAILED;
518
rc->msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
498
524
st = pInfo->instanceMI->ft->getInstance(pInfo->instanceMI,context,result,cop,props);
500
526
r = native_result2array(result);
570
599
unlockUpCall(broker);
571
600
if (pInfo->initialized == 0) {
572
initProvider(pInfo,binCtx.bHdr->sessionId);
601
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
574
st = pInfo->instanceMI->ft->createInstance(pInfo->instanceMI,context,result,cop,inst);
576
r = native_result2array(result);
578
op=CMGetArrayElementAt(r, 0, NULL).value.ref;
605
rc->rc = CMPI_RC_ERR_FAILED;
606
rc->msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
612
st = pInfo->instanceMI->ft->createInstance(pInfo->instanceMI,context,result,cop,inst);
614
r = native_result2array(result);
616
op=CMGetArrayElementAt(r, 0, NULL).value.ref;
647
688
CMPIResult *result = native_new_CMPIResult(0,1,NULL);
648
689
unlockUpCall(broker);
649
690
if (pInfo->initialized == 0) {
650
initProvider(pInfo,binCtx.bHdr->sessionId);
691
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
694
st.rc = CMPI_RC_ERR_FAILED;
695
st.msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
697
if (sreq) free(sreq);
652
701
st = pInfo->instanceMI->ft->modifyInstance(pInfo->instanceMI,context,result,cop,inst,props);
653
702
if (sreq) free(sreq);
658
708
resp = invokeProvider(&binCtx);
702
754
CMPIResult *result = native_new_CMPIResult(0,1,NULL);
703
755
unlockUpCall(broker);
704
756
if (pInfo->initialized == 0) {
705
initProvider(pInfo,binCtx.bHdr->sessionId);
757
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
760
st.rc = CMPI_RC_ERR_FAILED;
761
st.msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
707
766
st = pInfo->instanceMI->ft->deleteInstance(pInfo->instanceMI,context,result,cop);
768
830
unlockUpCall(broker);
769
831
if (pInfo->initialized == 0) {
770
initProvider(pInfo,binCtx.bHdr->sessionId);
832
initrc = initProvider(pInfo,binCtx.bHdr->sessionId, &errstr);
835
st.rc = CMPI_RC_ERR_FAILED;
836
st.msg = sfcb_native_new_CMPIString(errstr, NULL, 0);
772
842
rci = pInfo->instanceMI->ft->execQuery(
773
843
pInfo->instanceMI, context, result, cop, query, lang);
774
844
lockUpCall(broker);