[ostree] [staticanalysis]: Fix in_status_line



commit 4d04b148d8b6abad6b6ebc2685e67fc9421b308f
Author: Colin Walters <walters verbum org>
Date:   Sat Jun 21 17:35:03 2014 -0400

    [staticanalysis]: Fix in_status_line
    
    We need to end the status line *after* we've done a pull, as ostree
    admin upgrade does.  Also add the correct in_status_line assignment.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732020

 src/ostree/ot-admin-builtin-switch.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-switch.c b/src/ostree/ot-admin-builtin-switch.c
index 44861e5..a6a1862 100644
--- a/src/ostree/ot-admin-builtin-switch.c
+++ b/src/ostree/ot-admin-builtin-switch.c
@@ -126,15 +126,10 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell
   if (console)
     {
       gs_console_begin_status_line (console, "", NULL, NULL);
+      in_status_line = TRUE;
       progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console);
     }
 
-  if (in_status_line)
-    {
-      gs_console_end_status_line (console, NULL, NULL);
-      in_status_line = FALSE;
-    }
-
   /* Always allow older...there's not going to be a chronological
    * relationship necessarily.
    */
@@ -144,6 +139,12 @@ ot_admin_builtin_switch (int argc, char **argv, OstreeSysroot *sysroot, GCancell
                                      cancellable, error))
     goto out;
 
+  if (in_status_line)
+    {
+      gs_console_end_status_line (console, NULL, NULL);
+      in_status_line = FALSE;
+    }
+
   if (!ostree_sysroot_upgrader_deploy (upgrader, cancellable, error))
     goto out;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]