[rygel] core: (Un)pause the SoupMessage at the right time
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core: (Un)pause the SoupMessage at the right time
- Date: Mon, 13 Jul 2009 16:30:41 +0000 (UTC)
commit 79233603338c393800cdf637b1e231b2763fd82c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Jul 13 19:19:35 2009 +0300
core: (Un)pause the SoupMessage at the right time
- Pause the msg in run() method.
- Unpause the msg on error or HEAD message.
src/rygel/rygel-http-request.vala | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/rygel/rygel-http-request.vala b/src/rygel/rygel-http-request.vala
index 6095637..e579b0f 100644
--- a/src/rygel/rygel-http-request.vala
+++ b/src/rygel/rygel-http-request.vala
@@ -62,13 +62,13 @@ internal class Rygel.HTTPRequest : GLib.Object, Rygel.StateMachine {
this.server = server;
this.msg = msg;
this.query = query;
-
- this.server.pause_message (this.msg);
}
public void run (Cancellable? cancellable) {
this.cancellable = cancellable;
+ this.server.pause_message (this.msg);
+
if (this.msg.method != "HEAD" && this.msg.method != "GET") {
/* We only entertain 'HEAD' and 'GET' requests */
this.handle_error (
@@ -136,6 +136,7 @@ internal class Rygel.HTTPRequest : GLib.Object, Rygel.StateMachine {
if (this.msg.method == "HEAD") {
// Only headers requested, no need to send contents
+ this.server.unpause_message (this.msg);
this.end (Soup.KnownStatusCode.OK);
return;
}
@@ -338,6 +339,7 @@ internal class Rygel.HTTPRequest : GLib.Object, Rygel.StateMachine {
status = Soup.KnownStatusCode.NOT_FOUND;
}
+ this.server.unpause_message (this.msg);
this.end (status);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]