summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Novacek <rnovacek@redhat.com>2013-05-20 13:51:33 +0200
committerRadek Novacek <rnovacek@redhat.com>2013-05-20 13:51:33 +0200
commit0c4d0fa8489362654226cf2d82a408685478a83f (patch)
tree14e9087ad51c593648aa4b6eb5bf4069ac11de02
parent6aca507e826537a533ba73ee2dd83e5f900edca5 (diff)
downloadopenlmi-providers-0c4d0fa8489362654226cf2d82a408685478a83f.zip
openlmi-providers-0c4d0fa8489362654226cf2d82a408685478a83f.tar.gz
openlmi-providers-0c4d0fa8489362654226cf2d82a408685478a83f.tar.xz
power: fix undefined symbols in power provider0.0.23
Previous commit renamed LMI_ConcreteJob to LMI_PowerConcreteJob but didn't rename some symbols in power.c causing compilation to fail.
-rw-r--r--src/power/power.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/power/power.c b/src/power/power.c
index f5ba71a..96494dc 100644
--- a/src/power/power.c
+++ b/src/power/power.c
@@ -26,7 +26,7 @@
#include <glib.h>
#include "LMI_AssociatedPowerManagementService.h"
-#include "LMI_ConcreteJob.h"
+#include "LMI_PowerConcreteJob.h"
#ifdef HAS_UPOWER
#include <upower.h>
@@ -145,7 +145,7 @@ void *state_change_thread(void *data)
{
PowerStateChangeJob *powerStateChangeJob = data;
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Running;
+ powerStateChangeJob->jobState = LMI_PowerConcreteJob_JobState_Running;
powerStateChangeJob->timeOfLastChange = time(NULL);
MUTEX_UNLOCK(powerStateChangeJob);
@@ -153,7 +153,7 @@ void *state_change_thread(void *data)
// Check if the job was cancelled
if (powerStateChangeJob->cancelled) {
MUTEX_LOCK(powerStateChangeJob);
- powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Terminated;
+ powerStateChangeJob->jobState = LMI_PowerConcreteJob_JobState_Terminated;
powerStateChangeJob->timeOfLastChange = time(NULL);
MUTEX_UNLOCK(powerStateChangeJob);
@@ -231,9 +231,9 @@ void *state_change_thread(void *data)
MUTEX_LOCK(powerStateChangeJob);
if (succeeded) {
- powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Completed;
+ powerStateChangeJob->jobState = LMI_PowerConcreteJob_JobState_Completed;
} else {
- powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_Exception;
+ powerStateChangeJob->jobState = LMI_PowerConcreteJob_JobState_Exception;
#ifdef HAS_UPOWER
if (error != NULL) {
powerStateChangeJob->error = error->message;
@@ -270,7 +270,7 @@ int power_request_power_state(Power *power, unsigned short state)
powerStateChangeJob->power = power;
powerStateChangeJob->mutex = power->broker->xft->newMutex(0);
powerStateChangeJob->requestedPowerState = state;
- powerStateChangeJob->jobState = LMI_ConcreteJob_JobState_New;
+ powerStateChangeJob->jobState = LMI_PowerConcreteJob_JobState_New;
powerStateChangeJob->cancelled = 0;
powerStateChangeJob->superseded = 0;
powerStateChangeJob->timeOfLastChange = time(NULL);
@@ -286,13 +286,13 @@ int power_request_power_state(Power *power, unsigned short state)
while (plist) {
job = plist->data;
MUTEX_LOCK(job);
- if (job->jobState != LMI_ConcreteJob_JobState_Suspended &&
- job->jobState != LMI_ConcreteJob_JobState_Killed &&
- job->jobState != LMI_ConcreteJob_JobState_Terminated) {
+ if (job->jobState != LMI_PowerConcreteJob_JobState_Suspended &&
+ job->jobState != LMI_PowerConcreteJob_JobState_Killed &&
+ job->jobState != LMI_PowerConcreteJob_JobState_Terminated) {
job->cancelled = 1;
job->superseded = 1;
- job->jobState = LMI_ConcreteJob_JobState_Shutting_Down;
+ job->jobState = LMI_PowerConcreteJob_JobState_Shutting_Down;
job->timeOfLastChange = time(NULL);
}
MUTEX_UNLOCK(job);
@@ -505,9 +505,9 @@ GList *power_get_jobs(Power *power)
while (plist) {
powerStateChangeJob = plist->data;
MUTEX_LOCK(powerStateChangeJob);
- if ((powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Completed ||
- powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Killed ||
- powerStateChangeJob->jobState == LMI_ConcreteJob_JobState_Terminated) &&
+ if ((powerStateChangeJob->jobState == LMI_PowerConcreteJob_JobState_Completed ||
+ powerStateChangeJob->jobState == LMI_PowerConcreteJob_JobState_Killed ||
+ powerStateChangeJob->jobState == LMI_PowerConcreteJob_JobState_Terminated) &&
time(NULL) - powerStateChangeJob->timeOfLastChange > powerStateChangeJob->timeBeforeRemoval) {
MUTEX_LOCK(power);