summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-02-09 10:23:08 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2016-02-09 10:23:08 +0100
commiteaa8c24c7cf95a3cefdae961a0bf935d5a84f61a (patch)
treec5a14771a9aee93f2c075826f3689301e7320eb5
parent1329992e8d922a55d5b55039ba8c700e7801dab5 (diff)
afm-main-plugin: improves error reporting
Change-Id: I766f96f74434dfc0ec578e20769f91ce0796363e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--plugins/afm-main-plugin/afm-main-plugin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/afm-main-plugin/afm-main-plugin.c b/plugins/afm-main-plugin/afm-main-plugin.c
index 5315da9d..3feeafe3 100644
--- a/plugins/afm-main-plugin/afm-main-plugin.c
+++ b/plugins/afm-main-plugin/afm-main-plugin.c
@@ -171,6 +171,9 @@ static AFB_plugin plug_desc = {
AFB_plugin *pluginRegister()
{
jbus = create_jbus(1, "/org/AGL/afm/user");
- return jbus ? &plug_desc : NULL;
+ if (jbus)
+ return &plug_desc;
+ fprintf(stderr, "ERROR: %s:%d: can't connect to DBUS session\n", __FILE__, __LINE__);
+ return NULL;
}