diff options
Diffstat (limited to 'src/power/LMI_HostedPowerManagementServiceProvider.c')
-rw-r--r-- | src/power/LMI_HostedPowerManagementServiceProvider.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/power/LMI_HostedPowerManagementServiceProvider.c b/src/power/LMI_HostedPowerManagementServiceProvider.c index 889dd2c..b41021b 100644 --- a/src/power/LMI_HostedPowerManagementServiceProvider.c +++ b/src/power/LMI_HostedPowerManagementServiceProvider.c @@ -26,7 +26,7 @@ static const CMPIBroker* _cb; -static void LMI_HostedPowerManagementServiceInitialize() +static void LMI_HostedPowerManagementServiceInitialize(const CMPIContext *ctx) { } @@ -55,19 +55,12 @@ static CMPIStatus LMI_HostedPowerManagementServiceEnumInstances( const CMPIObjectPath* cop, const char** properties) { - CMPIStatus rc; const char *ns = KNameSpace(cop); LMI_HostedPowerManagementService w; LMI_HostedPowerManagementService_Init(&w, _cb, ns); - CIM_ComputerSystemRef computerSystemRef; - CIM_ComputerSystemRef_Init(&computerSystemRef, _cb, ns); - CIM_ComputerSystemRef_Set_Name(&computerSystemRef, get_system_name()); - CIM_ComputerSystemRef_Set_CreationClassName(&computerSystemRef, get_system_creation_class_name()); - CMPIObjectPath *computerSystemOP = CIM_ComputerSystemRef_ToObjectPath(&computerSystemRef, &rc); - computerSystemOP->ft->setClassName(computerSystemOP, get_system_creation_class_name()); - LMI_HostedPowerManagementService_SetObjectPath_Antecedent(&w, computerSystemOP); + LMI_HostedPowerManagementService_SetObjectPath_Antecedent(&w, lmi_get_computer_system()); LMI_PowerManagementServiceRef powerManagementServiceRef; LMI_PowerManagementServiceRef_Init(&powerManagementServiceRef, _cb, ns); @@ -233,13 +226,13 @@ CMInstanceMIStub( LMI_HostedPowerManagementService, LMI_HostedPowerManagementService, _cb, - LMI_HostedPowerManagementServiceInitialize()) + LMI_HostedPowerManagementServiceInitialize(ctx)) CMAssociationMIStub( LMI_HostedPowerManagementService, LMI_HostedPowerManagementService, _cb, - LMI_HostedPowerManagementServiceInitialize()) + LMI_HostedPowerManagementServiceInitialize(ctx)) KONKRET_REGISTRATION( "root/cimv2", |