From 274799cb084b62488a8abf56b6cb1c46304d2da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Mon, 10 Jun 2013 01:33:31 -0300 Subject: [PATCH] eldbus: Fix crash when eldbus is shutdown and we have a live connection of type address Also show info about each connection of type address live. --- src/lib/eldbus/eldbus_core.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/eldbus/eldbus_core.c b/src/lib/eldbus/eldbus_core.c index 25bde7edfc..a7af40fc9e 100644 --- a/src/lib/eldbus/eldbus_core.c +++ b/src/lib/eldbus/eldbus_core.c @@ -221,8 +221,16 @@ eldbus_shutdown(void) { if (eina_hash_population(address_connections)) { - CRITICAL("Alive TYPE_ADDRESS connection"); - print_live_connection(shared_connections[ELDBUS_CONNECTION_TYPE_ADDRESS - 1]); + Eina_Iterator *it; + Eina_Hash_Tuple *tuple; + + it = eina_hash_iterator_tuple_new(address_connections); + EINA_ITERATOR_FOREACH(it, tuple) + { + CRITICAL("Alive TYPE_ADDRESS connection: %s", (char*)tuple->key); + print_live_connection(tuple->data); + } + eina_iterator_free(it); } eina_hash_free(address_connections);