Fix for SVACE defects 45/87345/1
authorSeungbae Shin <seungbae.shin@samsung.com>
Wed, 7 Sep 2016 11:48:07 +0000 (20:48 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Wed, 7 Sep 2016 11:48:07 +0000 (20:48 +0900)
[Version] 5.0.70
[Profile] Common
[Issue Type] SVACE

Change-Id: I1ad7cb0d45ed01dd2f9f522b0ed911609218af4b

packaging/pulseaudio-modules-tizen.spec
src/device-manager.c
src/module-tizenaudio-policy.c
src/subscribe-observer.c

index e8c2c2a..df84175 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.69
+Version:          5.0.70
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index bdef6ac..3ca5831 100644 (file)
@@ -4071,10 +4071,8 @@ pa_source* pa_device_manager_get_source(dm_device *device_item, const char *role
 
     if ((source = pa_hashmap_get(profile_item->capture_devices, role)))
         pa_log_debug("Got source[%s] for [%s] role", source->name, role);
-    else {
-        source = pa_hashmap_get(profile_item->capture_devices, DEVICE_ROLE_NORMAL);
-        pa_log_debug("Could not get source for [%s] role. so get source[%s] for normal role", role, source->name);
-    }
+    else
+        pa_log_warn("Could not get source for [%s] role", role);
 
     return source;
 }
index 6db0eb0..9caedc7 100644 (file)
@@ -740,7 +740,10 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
                         pa_log_info("[ROUTE][AUTO_ALL] found the combine_sink already existed");
                     } else if (data->stream_type == STREAM_SINK_INPUT && !combine_sink_arg1) {
                         sink = combine_sink_arg1 = pa_device_manager_get_sink(device, data->device_role);
-                        pa_log_debug("[ROUTE][AUTO_ALL] combine_sink_arg1[%s], combine_sink_arg2[%p]", sink->name, combine_sink_arg2);
+                        if (sink)
+                            pa_log_debug("[ROUTE][AUTO_ALL] combine_sink_arg1[%s], combine_sink_arg2[%p]", sink->name, combine_sink_arg2);
+                        else
+                            pa_log_error("[ROUTE][AUTO_ALL] could not get sink from pa_device_manager_get_sink");
                     } else if (data->stream_type == STREAM_SINK_INPUT && !combine_sink_arg2) {
                         sink = combine_sink_arg2 = pa_device_manager_get_sink(device, data->device_role);
                         if (sink && !pa_streq(sink->name, combine_sink_arg1->name)) {
index 21a6576..5db7fa9 100644 (file)
@@ -98,12 +98,10 @@ static int convert_event_type_to_name(pa_tizen_event_t event_type, const char **
     if (event_type < 0 || event_type >= PA_TIZEN_EVENT_MAX)
         return -1;
 
-    if (event_type == PA_TIZEN_EVENT_DEVICE_CONNECTION_CHANGED) {
+    if (event_type == PA_TIZEN_EVENT_DEVICE_CONNECTION_CHANGED)
         *event_name = EVENT_NAME_DEVICE_DISCONNECTED;
-        return 0;
-    }
 
-    return -1;
+    return 0;
 }
 
 uint32_t subscriber_hash_func(const void *p) {