From: Jens Georg Date: Tue, 27 Sep 2011 12:42:37 +0000 (+0200) Subject: core: Delay handling of SoupMessage's signals X-Git-Tag: RYGEL_0_13_0~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6f44ffafc6c190eb12bbe813ea4910583862d1f;p=profile%2Fivi%2Frygel.git core: Delay handling of SoupMessage's signals Only connect to the relevant signals just before unpause_message happens. Otherwise we might get stray signals when one of the preconditions checked fails. --- diff --git a/src/rygel/rygel-http-post.vala b/src/rygel/rygel-http-post.vala index c9a5b75..c1bad97 100644 --- a/src/rygel/rygel-http-post.vala +++ b/src/rygel/rygel-http-post.vala @@ -58,9 +58,6 @@ internal class Rygel.HTTPPost : HTTPRequest { } private async void handle_real () throws Error { - this.msg.got_chunk.connect (this.on_got_chunk); - this.msg.got_body.connect (this.on_got_body); - if (!this.item.place_holder) { var msg = _("Pushing data to non-empty item '%s' not allowed"); @@ -83,6 +80,9 @@ internal class Rygel.HTTPPost : HTTPRequest { Priority.LOW, this.cancellable); + this.msg.got_chunk.connect (this.on_got_chunk); + this.msg.got_body.connect (this.on_got_body); + this.server.unpause_message (this.msg); this.handle_continue = this.handle_real.callback;