core: Correct problem in 229b7d
authorJens Georg <mail@jensge.org>
Tue, 18 Oct 2011 14:46:10 +0000 (16:46 +0200)
committerJens Georg <mail@jensge.org>
Tue, 18 Oct 2011 14:49:15 +0000 (16:49 +0200)
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

index c00ecc5..ba60287 100644 (file)
@@ -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;
                 }