Fix SVACE critical issues 36/95836/3
authorHyunseok Lee <hs7388.lee@samsung.com>
Wed, 2 Nov 2016 10:02:44 +0000 (19:02 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Thu, 10 Nov 2016 06:37:53 +0000 (15:37 +0900)
[Version] 5.0.92
[Profile] Common
[Issue Type] CleanUp

Change-Id: I9525604e746470c23085eab9346326a60d2eadf5

packaging/pulseaudio-modules-tizen.spec
src/module-tizenaudio-policy.c
src/stream-manager.c

index 698916f..58cccd2 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.91
+Version:          5.0.92
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index ab8c673..b51798b 100644 (file)
@@ -766,16 +766,18 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
 
                 /* move sink-inputs/source-outputs if needed */
                 if (data->stream_type == STREAM_SINK_INPUT)
-                    sink = pa_tz_device_get_sink(device, data->device_role);
-
                     /* unload combine sink */
                     if (data->stream_type == STREAM_SINK_INPUT && u->module_combine_sink) {
                         if ((combine_sink = (pa_sink*)pa_namereg_get(u->core, SINK_NAME_COMBINED, PA_NAMEREG_SINK))) {
-                            PA_IDXSET_FOREACH(s, combine_sink->inputs, s_idx) {
-                                pa_sink_input_move_to(s, sink, false);
-                                pa_log_debug("[ROUTE][AUTO] *** sink-input(%p,%u) moves to sink(%p,%s)",
-                                             s, ((pa_sink_input*)s)->index, sink, sink->name);
-                            }
+                            if ((sink = pa_tz_device_get_sink(device, data->device_role))) {
+                                PA_IDXSET_FOREACH(s, combine_sink->inputs, s_idx) {
+                                    pa_sink_input_move_to(s, sink, false);
+                                    pa_log_debug("[ROUTE][AUTO] *** sink-input(%p,%u) moves to sink(%p,%s)",
+                                                 s, ((pa_sink_input*)s)->index, sink, sink->name);
+                                }
+                            } else
+                                pa_log_error("[ROUTE][AUTO] could not get sink");
+
                             pa_sink_suspend(combine_sink, true, PA_SUSPEND_USER);
                         } else
                             pa_log_error("[ROUTE][AUTO] could not get combine_sink");
index 37badeb..738032f 100644 (file)
@@ -2177,7 +2177,7 @@ static void fill_device_info_to_hook_data(pa_stream_manager *m, void *hook_data,
                     pa_log_debug("  -- could not get the parent id of this stream, but keep going...");
             }
         } else
-            pa_log_error("  -- could not find (%s)", route_data->stream_role);
+            pa_log_error("  -- could not find (%s)", select_data->stream_role);
 
         break;
     }