summaryrefslogtreecommitdiff
path: root/src/lib/eldbus
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-19 13:23:24 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-19 13:24:30 -0500
commitf7cd6677666e9944a2df04edea9743fce9d9bc26 (patch)
tree6fe6b9b959dbe0297d70658bd619c98987f57ba7 /src/lib/eldbus
parent2cf1f0e6e358ff306fcc7ccc37b8289a52768a52 (diff)
eldbus: print dbus errors incurred when failing at signal handler operations
seeing these errors is significantly more helpful when debugging why the system is not responding as expected
Diffstat (limited to 'src/lib/eldbus')
-rw-r--r--src/lib/eldbus/eldbus_signal_handler.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/eldbus/eldbus_signal_handler.c b/src/lib/eldbus/eldbus_signal_handler.c
index 7009319ce9..164bf5eb7c 100644
--- a/src/lib/eldbus/eldbus_signal_handler.c
+++ b/src/lib/eldbus/eldbus_signal_handler.c
@@ -79,6 +79,8 @@ eldbus_signal_handler_match_extra_vset(Eldbus_Signal_Handler *sh, va_list ap)
79 dbus_error_init(&err); 79 dbus_error_init(&err);
80 dbus_bus_remove_match(sh->conn->dbus_conn, 80 dbus_bus_remove_match(sh->conn->dbus_conn,
81 eina_strbuf_string_get(sh->match), &err); 81 eina_strbuf_string_get(sh->match), &err);
82 if (dbus_error_is_set(&err))
83 ERR("handler(%p): %s - %s", sh, err.name, err.message);
82 EINA_SAFETY_ON_TRUE_RETURN_VAL(dbus_error_is_set(&err), EINA_FALSE); 84 EINA_SAFETY_ON_TRUE_RETURN_VAL(dbus_error_is_set(&err), EINA_FALSE);
83 85
84 for (read = va_arg(ap, char *); read; read = va_arg(ap, char *)) 86 for (read = va_arg(ap, char *); read; read = va_arg(ap, char *))
@@ -114,6 +116,8 @@ eldbus_signal_handler_match_extra_vset(Eldbus_Signal_Handler *sh, va_list ap)
114 dbus_error_init(&err); 116 dbus_error_init(&err);
115 dbus_bus_add_match(sh->conn->dbus_conn, 117 dbus_bus_add_match(sh->conn->dbus_conn,
116 eina_strbuf_string_get(sh->match), &err); 118 eina_strbuf_string_get(sh->match), &err);
119 if (dbus_error_is_set(&err))
120 ERR("handler(%p): %s - %s", sh, err.name, err.message);
117 if (!dbus_error_is_set(&err)) 121 if (!dbus_error_is_set(&err))
118 return EINA_TRUE; 122 return EINA_TRUE;
119 123
@@ -125,7 +129,7 @@ error:
125 dbus_bus_add_match(sh->conn->dbus_conn, 129 dbus_bus_add_match(sh->conn->dbus_conn,
126 eina_strbuf_string_get(sh->match), &err); 130 eina_strbuf_string_get(sh->match), &err);
127 if (dbus_error_is_set(&err)) 131 if (dbus_error_is_set(&err))
128 ERR("Error setting partial extra arguments."); 132 ERR("handler(%p): %s - %s", sh, err.name, err.message);
129 return EINA_FALSE; 133 return EINA_FALSE;
130} 134}
131 135
@@ -194,6 +198,8 @@ _eldbus_signal_handler_add(Eldbus_Connection *conn, const char *sender, const ch
194 198
195 dbus_error_init(&err); 199 dbus_error_init(&err);
196 dbus_bus_add_match(conn->dbus_conn, eina_strbuf_string_get(match), &err); 200 dbus_bus_add_match(conn->dbus_conn, eina_strbuf_string_get(match), &err);
201 if (dbus_error_is_set(&err))
202 ERR("handler(%p): %s - %s", sh, err.name, err.message);
197 if (dbus_error_is_set(&err)) goto cleanup; 203 if (dbus_error_is_set(&err)) goto cleanup;
198 204
199 if (sender) 205 if (sender)
@@ -237,6 +243,8 @@ _eldbus_signal_handler_clean(Eldbus_Signal_Handler *handler)
237 dbus_error_init(&err); 243 dbus_error_init(&err);
238 dbus_bus_remove_match(handler->conn->dbus_conn, 244 dbus_bus_remove_match(handler->conn->dbus_conn,
239 eina_strbuf_string_get(handler->match), &err); 245 eina_strbuf_string_get(handler->match), &err);
246 if (dbus_error_is_set(&err))
247 ERR("error removing handler(%p): %s - %s", handler, err.name, err.message);
240 handler->dangling = EINA_TRUE; 248 handler->dangling = EINA_TRUE;
241} 249}
242 250