summaryrefslogtreecommitdiff
path: root/src/commit
diff options
context:
space:
mode:
Diffstat (limited to 'src/commit')
-rw-r--r--src/commit/commit-algorithm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp
index f04b8c2..ab7eee6 100644
--- a/src/commit/commit-algorithm.cpp
+++ b/src/commit/commit-algorithm.cpp
@@ -1306,8 +1306,11 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
debug_on = !!getenv("VYOS_DEBUG");
TRACE_INIT("Processing the Priority Queue");
+ clear_last();
+ int num = pq.size();
while (!dpq.empty()) {
PrioNode *p = dpq.top();
+ set_if_last(num+dpq.size());
if (!_commit_exec_prio_subtree(cs, p)) {
// prio subtree failed
OUTPUT_USER("delete [ %s ] failed\n",
@@ -1321,6 +1324,7 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2)
}
while (!pq.empty()) {
PrioNode *p = pq.top();
+ set_if_last(pq.size());
if (!_commit_exec_prio_subtree(cs, p)) {
// prio subtree failed
OUTPUT_USER("[[%s]] failed\n",