From: Jens Georg Date: Tue, 18 Oct 2011 14:46:10 +0000 (+0200) Subject: core: Correct problem in 229b7d X-Git-Tag: RYGEL_0_13_0~52 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41bc13f999e44a8adf5dbdfa2a50c2696aae7528;p=profile%2Fivi%2Frygel.git 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. --- 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; }