Modify the interface naming for D-Bus (Add some prefix before app_id) 75/150975/1 tizen_3.0 submit/tizen_3.0/20170920.001624
authorJiyong Min <jiyong.min@samsung.com>
Tue, 19 Sep 2017 08:07:12 +0000 (17:07 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Tue, 19 Sep 2017 08:07:58 +0000 (17:07 +0900)
 [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 <jiyong.min@samsung.com>
packaging/capi-media-controller.spec
src/media_controller_util.c

index 3934c9e5c7fecb9ccbc572695ab6e49b99ec128c..c08ad3a34c5f188f21f4ac5b4c3b6a5d587ec6c4 100755 (executable)
@@ -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
index d02522f3e54c2e2c086473adfbe098b5762da96b..1115b16b7165c2d3e121340eb9b8ea769b520f0d 100755 (executable)
@@ -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");