summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2014-04-18 10:26:14 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-04-19 10:32:50 +0200
commit8779b9ee101ed3e5a6836b5366c006dc21dd36c0 (patch)
tree55c0b5e7ca6e10a108a5faba9d5421470e188115 /src
parent615316359a8cef049f1bb4e8fef5fd52cb1755fa (diff)
downloadsssd-8779b9ee101ed3e5a6836b5366c006dc21dd36c0.tar.gz
sssd-8779b9ee101ed3e5a6836b5366c006dc21dd36c0.tar.xz
sssd-8779b9ee101ed3e5a6836b5366c006dc21dd36c0.zip
sbus request: fix error initialization
fixes: sssd_dbus_request.c:28:1: error: missing initializer [-Werror=missing-field-initializers] sssd_dbus_request.c:28:1: error: (near initialization for 'error_internal.dummy1') [-Werror=missing-field-initializers]
Diffstat (limited to 'src')
-rw-r--r--src/sbus/sssd_dbus_request.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c
index 1546f0ddf..387691dea 100644
--- a/src/sbus/sssd_dbus_request.c
+++ b/src/sbus/sssd_dbus_request.c
@@ -25,7 +25,7 @@
#include <sys/time.h>
#include <dbus/dbus.h>
-static const DBusError error_internal = { DBUS_ERROR_FAILED, "Internal Error" };
+#define INTERNAL_ERROR "Internal Error"
static int sbus_request_destructor(struct sbus_request *dbus_req)
{
@@ -60,6 +60,7 @@ sbus_request_invoke_or_finish(struct sbus_request *dbus_req,
void *handler_data,
sbus_method_invoker_fn invoker_fn)
{
+ DBusError error;
int ret;
if (invoker_fn) {
@@ -76,7 +77,8 @@ sbus_request_invoke_or_finish(struct sbus_request *dbus_req,
sbus_request_finish(dbus_req, NULL);
break;
default:
- sbus_request_fail_and_finish(dbus_req, &error_internal);
+ dbus_set_error_const(&error, DBUS_ERROR_FAILED, INTERNAL_ERROR);
+ sbus_request_fail_and_finish(dbus_req, &error);
break;
}
}