aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-11 11:56:42 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-11 11:58:06 +0200
commit4dd0c142414abd14eeaed8871cfc776139a78b28 (patch)
treec88c884b2fccaeb58c119c4308a8734e4db07ddb /plugins
parentdef39ec22797c5cd40b7f0bf97df6007c62b3f7d (diff)
fix dbus disconnection on error
Change-Id: Ifddabb8c76094fca088ad5250b8dde30a48946c7 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/afm-main-plugin/utils-jbus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/afm-main-plugin/utils-jbus.c b/plugins/afm-main-plugin/utils-jbus.c
index ec2ee01a..c4146a46 100644
--- a/plugins/afm-main-plugin/utils-jbus.c
+++ b/plugins/afm-main-plugin/utils-jbus.c
@@ -26,6 +26,7 @@
#include <json-c/json.h>
#include <systemd/sd-bus.h>
+#include <systemd/sd-bus-protocol.h>
#include "utils-jbus.h"
@@ -518,7 +519,7 @@ void jbus_unref(struct jbus *jbus)
*/
int jbus_reply_error_s(struct sd_bus_message *smsg, const char *error)
{
- return mkerrno(sd_bus_reply_method_errorf(smsg, "error", "%s", error));
+ return mkerrno(sd_bus_reply_method_errorf(smsg, SD_BUS_ERROR_FAILED, "%s", error));
}
/*