From c790767114b8266dc41e51e9c5f49514882bf2c4 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Sun, 14 Dec 2008 20:22:32 +0000 Subject: [PATCH] Streamer rejects the stream, rather than signal handler. svn path=/trunk/; revision=347 --- src/plugins/test/rygel-test-item.vala | 1 - src/rygel/rygel-streamer.vala | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/test/rygel-test-item.vala b/src/plugins/test/rygel-test-item.vala index 37e1ba8..0f77094 100644 --- a/src/plugins/test/rygel-test-item.vala +++ b/src/plugins/test/rygel-test-item.vala @@ -61,7 +61,6 @@ public abstract class Rygel.TestItem : Rygel.MediaItem { string path) { if (path != this.path) { /* Not our path and therefore not interesting. */ - stream.reject (); return; } diff --git a/src/rygel/rygel-streamer.vala b/src/rygel/rygel-streamer.vala index 367531f..f2bf930 100644 --- a/src/rygel/rygel-streamer.vala +++ b/src/rygel/rygel-streamer.vala @@ -92,6 +92,12 @@ public class Rygel.Streamer : GLib.Object { var stream = new Stream (server, msg); this.stream_available (stream, stream_path); + + if (!stream.accepted ()) { + /* No body accepted the stream. */ + stream.reject (); + return; + } } } -- 2.7.4