Forward error from dbus method properly in mm_sound_proxy.c 90/156290/1
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 18 Oct 2017 01:27:48 +0000 (10:27 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 18 Oct 2017 02:37:13 +0000 (02:37 +0000)
[Version] 0.11.28
[Issue Type] Bug Fix

Change-Id: I1c4531df4983658f58db8b50a57fb32153015f9e
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
mm_sound_proxy.c
packaging/libmm-sound.spec

index 603434c4df596d63181a22089680d10f185ab4d5..0f551a8d67109940a0995a89b814089fe2ad55ec 100644 (file)
@@ -374,8 +374,8 @@ int mm_sound_proxy_get_current_connected_device_list(int device_flags, GList** d
                        MMSOUND_STRNCPY(device_item->name, device_name_tmp, MAX_DEVICE_NAME_NUM);
                        MMSOUND_STRNCPY(device_item->type, device_type_tmp, MAX_DEVICE_TYPE_STR_LEN);
                        *device_list = g_list_append(*device_list, device_item);
-                       debug_log("Added device id(%d) type(%17s) direction(%d) state(%d) name(%s) vendor-id(%04x), product-id(%04x)",
-                                       device_item->id, device_item->type,device_item->io_direction, device_item->state,
+                       debug_log("Added device id(%d) type(%17s) direction(%d) state(%d) name(%s) vendor-id(%04x) product-id(%04x)",
+                                       device_item->id, device_item->type, device_item->io_direction, device_item->state,
                                        device_item->name, device_item->vendor_id, device_item->product_id);
                        device_item->stream_num = -1;
                } else {
@@ -576,7 +576,7 @@ int mm_sound_proxy_set_volume_by_type(const char *volume_type, const unsigned vo
        if (result) {
                g_variant_get(result, "(&s)",  &reply);
                debug_log("reply : %s", reply);
-               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                        ret = MM_ERROR_SOUND_INTERNAL;
        } else {
                debug_error("reply null");
@@ -644,7 +644,7 @@ int mm_sound_proxy_set_filter_by_type(const char *stream_type, const char *filte
        if (result) {
                g_variant_get(result, "(&s)", &reply);
                debug_log("reply : %s", reply);
-               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                        ret = MM_ERROR_SOUND_INTERNAL;
        } else {
                debug_error("reply null");
@@ -680,7 +680,7 @@ int mm_sound_proxy_unset_filter_by_type(const char *stream_type)
        if (result) {
                g_variant_get(result, "(&s)", &reply);
                debug_log("reply : %s", reply);
-               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                        ret = MM_ERROR_SOUND_INTERNAL;
        } else {
                debug_error("reply null");
@@ -716,7 +716,7 @@ int mm_sound_proxy_control_filter_by_type(const char *stream_type, const char *f
        if (result) {
                g_variant_get(result, "(&s)", &reply);
                debug_log("reply : %s", reply);
-               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                        ret = MM_ERROR_SOUND_INTERNAL;
        } else {
                debug_error("reply null");
@@ -747,7 +747,7 @@ int mm_sound_proxy_play_tone(int tone, int repeat, int volume, int volume_config
        debug_fenter();
 
        params = g_variant_new("(iiiiiiibsi)", tone, repeat, volume, volume_config, session_type,
-                              session_options, client_pid , _enable_session, stream_type, stream_index);
+                               session_options, client_pid , _enable_session, stream_type, stream_index);
        if (params) {
                if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_DTMF, params, &result)) != MM_ERROR_NONE) {
                        debug_error("dbus play tone failed");
@@ -829,7 +829,7 @@ int mm_sound_proxy_play_sound(const char* filename, int tone, int repeat, int vo
        debug_fenter();
 
        params = g_variant_new("(siiiiiiibsi)", filename, tone, repeat, volume,
-                     volume_config, session_type, session_options, client_pid, _enable_session, stream_type, stream_index);
+                               volume_config, session_type, session_options, client_pid, _enable_session, stream_type, stream_index);
        if (params) {
                if ((ret = mm_sound_dbus_method_call_to(AUDIO_PROVIDER_SOUND_SERVER, AUDIO_METHOD_PLAY_FILE_START, params, &result)) != MM_ERROR_NONE) {
                        debug_error("dbus play file failed");
@@ -1194,7 +1194,7 @@ int mm_sound_proxy_update_stream_focus_status(int focus_id, unsigned int status)
                        if (result) {
                                g_variant_get(result, "(&s)",  &reply);
                                debug_log("reply : %s", reply);
-                               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+                               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                                        ret = MM_ERROR_SOUND_INTERNAL;
                        }
                }
@@ -1225,7 +1225,7 @@ int mm_sound_proxy_deliver_focus(int pid, int src_id, int dst_id, mm_sound_focus
                        if (result) {
                                g_variant_get(result, "(&s)", &reply);
                                debug_log("reply : %s", reply);
-                               if (!strcmp(reply, "STREAM_MANAGER_RETURN_ERROR"))
+                               if (strcmp(reply, "STREAM_MANAGER_RETURN_OK"))
                                        ret = MM_ERROR_SOUND_INTERNAL;
                        }
                }
index c4c993ca19513508d79a535eb5db5610a615a759..9164958cbacc9c3d3f964686ff76d6ac43d13f76 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.11.27
+Version:    0.11.28
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0