From 79bfa03372ffac6235e9baa5d31d524507b98307 Mon Sep 17 00:00:00 2001 From: Michael Schuldt Date: Thu, 3 May 2012 09:14:35 +0200 Subject: [PATCH] ilm_client: Bugfix: Return success if ilm client is already initialized --- LayerManagerClient/ilmClient/src/ilm_client.c | 39 ++++++++++++++------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/LayerManagerClient/ilmClient/src/ilm_client.c b/LayerManagerClient/ilmClient/src/ilm_client.c index 15bc8dc..781689c 100644 --- a/LayerManagerClient/ilmClient/src/ilm_client.c +++ b/LayerManagerClient/ilmClient/src/ilm_client.c @@ -87,6 +87,8 @@ ilmErrorTypes ilm_init() } } } + } else { + result = ILM_SUCCESS; } return result; } @@ -127,15 +129,15 @@ ilmErrorTypes ilm_getPropertiesOfSurface(t_ilm_uint surfaceID, struct ilmSurface _ilm_setup_param(¶m[14], DBUS_TYPE_UINT32, &pSurfaceProperties->frameCounter); - /* Setup message to send */ - DBusMessage *message; - message = _ilm_dbus_method_call(g_ilm_client->dbus_connection,"GetPropertiesOfSurface",param,1); - if (!message) - { - ILM_ERROR("ilm_getPropertiesOfSurface","IPC Method call not possible can't setup remote message\n"); - return ILM_ERROR_ON_CONNECTION; - } - ILM_CHECK_METHOD_ERROR(message); + /* Setup message to send */ + DBusMessage *message; + message = _ilm_dbus_method_call(g_ilm_client->dbus_connection,"GetPropertiesOfSurface",param,1); + if (!message) + { + ILM_ERROR("ilm_getPropertiesOfSurface","IPC Method call not possible can't setup remote message\n"); + return ILM_ERROR_ON_CONNECTION; + } + ILM_CHECK_METHOD_ERROR(message); // read the parameters returnValue = _ilm_get_dbus_basic_elements(message, 14, ¶m[1]); @@ -175,15 +177,15 @@ ilmErrorTypes ilm_getPropertiesOfLayer(t_ilm_uint layerID, struct ilmLayerProper _ilm_setup_param(¶m[13], DBUS_TYPE_BOOLEAN, &pLayerProperties->visibility); - /* Setup message to send */ - DBusMessage *message; - message = _ilm_dbus_method_call(g_ilm_client->dbus_connection,"GetPropertiesOfLayer", param, 1); - if (!message) - { - ILM_ERROR("ilm_getPropertiesOfLayer","IPC Method call not possible can't setup remote message\n"); - return ILM_ERROR_ON_CONNECTION; - } - ILM_CHECK_METHOD_ERROR(message); + /* Setup message to send */ + DBusMessage *message; + message = _ilm_dbus_method_call(g_ilm_client->dbus_connection,"GetPropertiesOfLayer", param, 1); + if (!message) + { + ILM_ERROR("ilm_getPropertiesOfLayer","IPC Method call not possible can't setup remote message\n"); + return ILM_ERROR_ON_CONNECTION; + } + ILM_CHECK_METHOD_ERROR(message); if (!message) { @@ -1326,6 +1328,7 @@ ilmErrorTypes ilm_surfaceSetNativeContent(t_ilm_nativehandle nativehandle, t_ilm if (message) { ILM_CHECK_METHOD_ERROR(message); + result = ILM_SUCCESS; _ilm_close_dbus_method_call(message); } else -- 2.7.4