summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2014-06-30 10:30:11 +0200
committerMichal Minar <miminar@redhat.com>2014-07-01 10:06:27 +0200
commit12cb84add1378bbd99e01bdc1de0ab4098945343 (patch)
tree3bc7efa16a9896426915e28f7f69669c546eb140
parent6009f6fd26243f73a71a5015d06f3f9480d875eb (diff)
downloadopenlmi-providers-12cb84add1378bbd99e01bdc1de0ab4098945343.tar.gz
openlmi-providers-12cb84add1378bbd99e01bdc1de0ab4098945343.tar.xz
openlmi-providers-12cb84add1378bbd99e01bdc1de0ab4098945343.zip
providers: logging fixes
Fixes logging of messages taking CMPIStatus::msg as an argument. *msg* needs to be wrapped in CMGetCharsPtr().
-rw-r--r--src/libs/jobmanager/job_manager.c8
-rw-r--r--src/software-dbus/LMI_SoftwareInstallationJobProvider.c4
-rw-r--r--src/software-dbus/sw-utils.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/src/libs/jobmanager/job_manager.c b/src/libs/jobmanager/job_manager.c
index d2869b2..bc654d7 100644
--- a/src/libs/jobmanager/job_manager.c
+++ b/src/libs/jobmanager/job_manager.c
@@ -1043,7 +1043,7 @@ static CMPIStatus delete_job(LmiJob *job)
{
if (status.msg) {
lmi_error("Failed to create instance deletion indication: %s",
- status.msg);
+ CMGetCharsPtr(status.msg, NULL));
} else {
lmi_error("Failed to create instance deletion indication!");
}
@@ -1060,7 +1060,7 @@ static CMPIStatus delete_job(LmiJob *job)
{
if (status.msg) {
lmi_error("Failed to send instance deletion indication: %s",
- status.msg);
+ CMGetCharsPtr(status.msg, NULL));
} else {
lmi_error("Failed to send instance deletion indication!");
}
@@ -1502,7 +1502,7 @@ static gboolean register_job(LmiJob *job, gboolean is_new)
{
if (status.msg) {
lmi_error("Failed to create instance creation indication: %s",
- status.msg);
+ CMGetCharsPtr(status.msg, NULL));
} else {
lmi_error("Failed to create instance creation indication!");
}
@@ -1511,7 +1511,7 @@ static gboolean register_job(LmiJob *job, gboolean is_new)
{
if (status.msg) {
lmi_error("Failed to send instance creation indication: %s",
- status.msg);
+ CMGetCharsPtr(status.msg, NULL));
} else {
lmi_error("Failed to send instance creation indication!");
}
diff --git a/src/software-dbus/LMI_SoftwareInstallationJobProvider.c b/src/software-dbus/LMI_SoftwareInstallationJobProvider.c
index 47f4c82..f0b7327 100644
--- a/src/software-dbus/LMI_SoftwareInstallationJobProvider.c
+++ b/src/software-dbus/LMI_SoftwareInstallationJobProvider.c
@@ -92,7 +92,7 @@ static CMPIStatus LMI_SoftwareInstallationJobEnumInstances(
if (status.msg) {
jobid = lmi_job_get_jobid(job);
lmi_warn("Failed to make cim instance out of job \"%s\": %s",
- jobid, status.msg);
+ jobid, CMGetCharsPtr(status.msg, NULL));
g_free(jobid);
continue;
}
@@ -129,7 +129,7 @@ static CMPIStatus LMI_SoftwareInstallationJobGetInstance(
if (status.msg) {
jobid = lmi_job_get_jobid(job);
lmi_warn("Failed to make cim instance out of job \"%s\": %s",
- jobid, status.msg);
+ jobid, CMGetCharsPtr(status.msg, NULL));
g_free(jobid);
return status;
}
diff --git a/src/software-dbus/sw-utils.c b/src/software-dbus/sw-utils.c
index 6922015..382ce72 100644
--- a/src/software-dbus/sw-utils.c
+++ b/src/software-dbus/sw-utils.c
@@ -884,8 +884,6 @@ done:
if (task) {
g_object_unref(task);
}
-
- return status;
}
void get_repo_id_from_sw_pkg(const SwPackage *sw_pkg, gchar **repo_id_p,