core: Don't keep SoupServer alive
authorJens Georg <mail@jensge.org>
Mon, 19 Sep 2011 10:11:00 +0000 (12:11 +0200)
committerJens Georg <mail@jensge.org>
Mon, 19 Sep 2011 10:13:46 +0000 (12:13 +0200)
If the context goes down while a transmission is ongoing, the
SoupServer is kept alive by the response causing a crash if the context
comes up again on the same interface. To prevent this we only use
unowned SoupServers here.

src/rygel/rygel-http-request.vala
src/rygel/rygel-http-response.vala

index ff265d1..1a79065 100644 (file)
@@ -35,7 +35,7 @@ internal errordomain Rygel.HTTPRequestError {
 internal abstract class Rygel.HTTPRequest : GLib.Object, Rygel.StateMachine {
     public unowned HTTPServer http_server;
     private MediaContainer root_container;
-    public Soup.Server server;
+    public unowned Soup.Server server;
     public Soup.Message msg;
 
     public Cancellable cancellable { get; set; }
index 4f8dfa9..ecc75fa 100644 (file)
@@ -25,7 +25,7 @@ using Gst;
 using Soup;
 
 internal class Rygel.HTTPResponse : GLib.Object, Rygel.StateMachine {
-    public Soup.Server server { get; private set; }
+    public unowned Soup.Server server { get; private set; }
     public Soup.Message msg;
 
     public Cancellable cancellable { get; set; }