From 41bc13f999e44a8adf5dbdfa2a50c2696aae7528 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Tue, 18 Oct 2011 16:46:10 +0200 Subject: [PATCH] core: Correct problem in 229b7d Lesson learned: Never name two variables that do two different things similar and always wait for the duration of the timeout before shutting rygel down. --- src/rygel/rygel-http-post.vala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rygel/rygel-http-post.vala b/src/rygel/rygel-http-post.vala index c00ecc5..ba60287 100644 --- a/src/rygel/rygel-http-post.vala +++ b/src/rygel/rygel-http-post.vala @@ -121,11 +121,11 @@ internal class Rygel.HTTPPost : HTTPRequest { } if (item.place_holder) { - uint timeout_id = 0; - timeout = Timeout.add_seconds (30, () => { + uint source_id = 0; + source_id = Timeout.add_seconds (30, () => { debug ("Timeout on waiting for 'updated' signal on '%s'.", container.id); - timeout_id = 0; + source_id = 0; this.wait_for_item.callback (); return false; @@ -142,8 +142,8 @@ internal class Rygel.HTTPPost : HTTPRequest { container.disconnect (update_id); - if (timeout_id != 0) { - Source.remove (timeout); + if (source_id != 0) { + Source.remove (source_id); } else { break; } -- 2.7.4