From: Jiyong Min Date: Tue, 19 Sep 2017 08:07:12 +0000 (+0900) Subject: Modify the interface naming for D-Bus (Add some prefix before app_id) X-Git-Tag: submit/tizen_3.0/20170920.001624^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f139ca54fa494009fae9402ee38ba1fe5951d07a;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Modify the interface naming for D-Bus (Add some prefix before app_id) [Problem] Rarely, media-controller return error(-38) for specific web-application. - Cause If the web application has the app_id begins with number, also an element of D-Bus interface begins with number due to the app_id is one of the element. But D-Bus does not accept that the element begins with number, so D-Bus return error. - Solution The prefix has been added before app_id, so all elements of the interface begins with character. Change-Id: I1c9df9f77ec8b79c251640b5abecf38bab029c10 Signed-off-by: Jiyong Min --- diff --git a/packaging/capi-media-controller.spec b/packaging/capi-media-controller.spec index 3934c9e..c08ad3a 100755 --- a/packaging/capi-media-controller.spec +++ b/packaging/capi-media-controller.spec @@ -1,6 +1,6 @@ Name: capi-media-controller Summary: A media controller library in Tizen Native API -Version: 0.1.36 +Version: 0.1.37 Release: 1 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_controller_util.c b/src/media_controller_util.c index d02522f..1115b16 100755 --- a/src/media_controller_util.c +++ b/src/media_controller_util.c @@ -88,7 +88,7 @@ char *mc_util_get_interface_name(const char *type, const char *name) mc_retvm_if(type == NULL, NULL, "type is NULL"); mc_retvm_if(name == NULL, NULL, "name is NULL"); - temp = g_strdup_printf("%s.%s.%s", MC_DBUS_INTERFACE_PREFIX, type, name); + temp = g_strdup_printf("%s.%s%s", MC_DBUS_INTERFACE_PREFIX, type, name); _mc_util_check_valid_name(temp, &interface_name); MC_SAFE_G_FREE(temp); @@ -102,7 +102,7 @@ int mc_util_make_filter_interface_name(const char *prefix, const char *filter, c mc_retvm_if(prefix == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "prefix is NULL"); mc_retvm_if(filter == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "filter is NULL"); - temp = g_strdup_printf("%s.%s", prefix, filter); + temp = g_strdup_printf("%s.server%s", prefix, filter); if (temp == NULL) { mc_error("Fail to make interface_name");