[rygel] core: Wait for container update after HTTP POST
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Wait for container update after HTTP POST
- Date: Fri, 19 Nov 2010 13:22:34 +0000 (UTC)
commit b690dd861f0c8400fc30948bb6bc4bfbb4b074b6
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Nov 19 15:13:20 2010 +0200
core: Wait for container update after HTTP POST
Wait for updated signal from the parent container after pushing content
to a child item before returning an 'OK' to the client. This is needed to
satisfy the bogus check at the end of the DLNA CTT testcase 7.3.136.4.
src/rygel/rygel-http-post.vala | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/src/rygel/rygel-http-post.vala b/src/rygel/rygel-http-post.vala
index 8e2385b..96edeb4 100644
--- a/src/rygel/rygel-http-post.vala
+++ b/src/rygel/rygel-http-post.vala
@@ -84,11 +84,26 @@ internal class Rygel.HTTPPost : HTTPRequest {
}
private void on_got_body (Message msg) {
- if (this.msg == msg) {
- this.end (KnownStatusCode.OK);
-
- this.handle_continue ();
+ if (this.msg != msg) {
+ return;
}
+
+ var main_loop = new MainLoop ();
+
+ this.item.parent.container_updated.connect ((container) => {
+ main_loop.quit ();
+ });
+
+ debug ("Waiting for update signal from container '%s' after pushing content" +
+ " to its child item '%s'..",
+ this.item.parent.id,
+ this.item.id);
+ main_loop.run ();
+ debug ("Finished waiting for update signal from container '%s'",
+ this.item.parent.id);
+
+ this.end (KnownStatusCode.OK);
+ this.handle_continue ();
}
private void on_got_chunk (Message msg, Buffer chunk) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]