summaryrefslogtreecommitdiff
path: root/src/lib/eldbus/eldbus_service.c
diff options
context:
space:
mode:
authorLukasz Stanislawski <l.stanislaws@samsung.com>2015-09-22 00:04:35 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-09-22 00:04:38 +0200
commitabdbb9ad1432e2b3a7845f8466ec042fb684f2d0 (patch)
treefa7c679ae558f73d0a5f77dd7c9f2956c1b993a3 /src/lib/eldbus/eldbus_service.c
parentabaf29cb768375957c9ee0b64d36034c21c618ea (diff)
eldbus: fix broken fallback interface.
Summary: Previous implementation assumed that fallback interface path should be changed on every method call. This is generally not needed since real request path can be obtained directly from dbus message passed as method call paremeter. This patch reverts this behaviour and additionally fix broken Property and Introspect interface handling of fallback interface. Reviewers: raster, lucasdemarchi, cedric Subscribers: cedric, seoz Differential Revision: https://phab.enlightenment.org/D3016 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/eldbus/eldbus_service.c')
-rw-r--r--src/lib/eldbus/eldbus_service.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/lib/eldbus/eldbus_service.c b/src/lib/eldbus/eldbus_service.c
index f92f821203..9fdcdd5a6b 100644
--- a/src/lib/eldbus/eldbus_service.c
+++ b/src/lib/eldbus/eldbus_service.c
@@ -669,8 +669,6 @@ _eldbus_service_object_add(Eldbus_Connection *conn, const char *path, Eina_Bool
669 obj->interfaces = eina_hash_string_superfast_new(NULL); 669 obj->interfaces = eina_hash_string_superfast_new(NULL);
670 eldbus_connection_free_cb_add(conn, _on_connection_free, obj); 670 eldbus_connection_free_cb_add(conn, _on_connection_free, obj);
671 671
672 if (obj->fallback) return obj;
673
674 eina_hash_add(obj->interfaces, introspectable->name, introspectable); 672 eina_hash_add(obj->interfaces, introspectable->name, introspectable);
675 eina_hash_add(obj->interfaces, properties_iface->name, properties_iface); 673 eina_hash_add(obj->interfaces, properties_iface->name, properties_iface);
676 674
@@ -1324,18 +1322,11 @@ _object_handler(DBusConnection *dbus_conn EINA_UNUSED, DBusMessage *msg, void *u
1324 const Eldbus_Method *method; 1322 const Eldbus_Method *method;
1325 Eldbus_Message *eldbus_msg, *reply; 1323 Eldbus_Message *eldbus_msg, *reply;
1326 Eldbus_Connection *conn; 1324 Eldbus_Connection *conn;
1327 const char* fallback_path = NULL;
1328 1325
1329 obj = user_data; 1326 obj = user_data;
1330 if (!obj) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; 1327 if (!obj) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
1331 conn = obj->conn; 1328 conn = obj->conn;
1332 1329
1333 if (obj->fallback)
1334 {
1335 fallback_path = eina_stringshare_add(obj->path);
1336 eina_stringshare_replace(&obj->path, dbus_message_get_path(msg));
1337 }
1338
1339 DBG("Connection@%p Got message:\n" 1330 DBG("Connection@%p Got message:\n"
1340 " Type: %s\n" 1331 " Type: %s\n"
1341 " Path: %s\n" 1332 " Path: %s\n"
@@ -1387,12 +1378,6 @@ _object_handler(DBusConnection *dbus_conn EINA_UNUSED, DBusMessage *msg, void *u
1387 eldbus_connection_unref(conn); 1378 eldbus_connection_unref(conn);
1388 eldbus_shutdown(); 1379 eldbus_shutdown();
1389 1380
1390 if (obj->fallback)
1391 {
1392 eina_stringshare_replace(&obj->path, fallback_path);
1393 eina_stringshare_del(fallback_path);
1394 }
1395
1396 return DBUS_HANDLER_RESULT_HANDLED; 1381 return DBUS_HANDLER_RESULT_HANDLED;
1397} 1382}
1398 1383