summaryrefslogtreecommitdiff
path: root/src/lib/ethumb_client
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-07-11 22:59:55 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-07-13 17:52:46 +0200
commita393a90ccc18462b4886793109c3ca24fcc6b08e (patch)
treea7ff721b90d7a68df54f4ca54c58699f2a195429 /src/lib/ethumb_client
parent2437d5327806c3b1c489adf4e78018a7bcfa4ced (diff)
ethumb: tell the user if the connection to the deamon failed
otherwise the user just gets no thumbnails, and no error message what actually happened.
Diffstat (limited to 'src/lib/ethumb_client')
-rw-r--r--src/lib/ethumb_client/ethumb_client.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/ethumb_client/ethumb_client.c b/src/lib/ethumb_client/ethumb_client.c
index 55b22f6c10..e5919f7dbf 100644
--- a/src/lib/ethumb_client/ethumb_client.c
+++ b/src/lib/ethumb_client/ethumb_client.c
@@ -544,6 +544,17 @@ ethumb_client_shutdown(void)
544 return _initcount; 544 return _initcount;
545} 545}
546 546
547static void
548_name_start(void *data EINA_UNUSED, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
549{
550 const char *name, *text;
551 if (eldbus_message_error_get(msg, &name, &text))
552 {
553 ERR("Starting ethumb failed %s %s", name, text);
554 return;
555 }
556}
557
547/** 558/**
548 * Connects to Ethumb server and return the client instance. 559 * Connects to Ethumb server and return the client instance.
549 * 560 *
@@ -615,7 +626,12 @@ ethumb_client_connect(Ethumb_Client_Connect_Cb connect_cb, const void *data, Ein
615 goto connection_err; 626 goto connection_err;
616 } 627 }
617 628
618 eldbus_name_start(eclient->conn, _ethumb_dbus_bus_name, 0, NULL, NULL); 629 if (!eldbus_name_start(eclient->conn, _ethumb_dbus_bus_name, 0, _name_start, NULL))
630 {
631 ERR("Failed to start ethumb bus");
632 goto connection_err;
633 }
634
619 eldbus_name_owner_changed_callback_add(eclient->conn, _ethumb_dbus_bus_name, 635 eldbus_name_owner_changed_callback_add(eclient->conn, _ethumb_dbus_bus_name,
620 _ethumb_client_name_owner_changed, 636 _ethumb_client_name_owner_changed,
621 eclient, EINA_TRUE); 637 eclient, EINA_TRUE);