Blame SOURCES/bz1070916-pcmk-fencing_remove_shadow_definition_and_use_of_variable_progress.patch

7100e8
commit 29d542447da8bd120072a7fa8dd6df832f0856eb
7100e8
Author: Andrew Beekhof <andrew@beekhof.net>
7100e8
Date:   Fri Feb 28 14:11:23 2014 +1100
7100e8
7100e8
    Fix: Fencing: Remove shadow definition and use of variable 'progress'
7100e8
    
7100e8
    (cherry picked from commit 0debc914b1dda2c4d04f4a33a3b38fbb4d873b1b)
7100e8
7100e8
diff --git a/lib/fencing/st_client.c b/lib/fencing/st_client.c
7100e8
index 4deb71f..95ea0f7 100644
7100e8
--- a/lib/fencing/st_client.c
7100e8
+++ b/lib/fencing/st_client.c
7100e8
@@ -2420,7 +2420,6 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
7100e8
     char *name = NULL;
7100e8
 
7100e8
     time_t when = 0;
7100e8
-    time_t progress = 0;
7100e8
     stonith_t *st = NULL;
7100e8
     stonith_history_t *history, *hp = NULL;
7100e8
     enum stonith_call_options opts = st_opt_sync_call;
7100e8
@@ -2453,7 +2452,7 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
7100e8
             if (in_progress) {
7100e8
                 progress++;
7100e8
                 if (hp->state != st_done && hp->state != st_failed) {
7100e8
-                    progress = time(NULL);
7100e8
+                    when = time(NULL);
7100e8
                 }
7100e8
 
7100e8
             } else if (hp->state == st_done) {
7100e8
@@ -2471,10 +2470,6 @@ stonith_api_time(uint32_t nodeid, const char *uname, bool in_progress)
7100e8
         }
7100e8
     }
7100e8
 
7100e8
-    if (progress) {
7100e8
-        when = progress;
7100e8
-    }
7100e8
-
7100e8
     if (st) {
7100e8
         st->cmds->disconnect(st);
7100e8
         stonith_api_delete(st);