[rygel/wip/basic-management: 85/95] core: return "Canceled" state when BasicManagement test is canceled
- From: Jussi Kukkonen <jussik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/basic-management: 85/95] core: return "Canceled" state when BasicManagement test is canceled
- Date: Fri, 11 Oct 2013 13:01:27 +0000 (UTC)
commit 60fe72837e58e65c09d1555d0cac2a17e1024f73
Author: Jussi Kukkonen <jussi kukkonen intel com>
Date: Mon Jun 24 11:30:44 2013 +0300
core: return "Canceled" state when BasicManagement test is canceled
src/librygel-core/rygel-basic-management-test.vala | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/src/librygel-core/rygel-basic-management-test.vala
b/src/librygel-core/rygel-basic-management-test.vala
index ff264a4..83414b7 100644
--- a/src/librygel-core/rygel-basic-management-test.vala
+++ b/src/librygel-core/rygel-basic-management-test.vala
@@ -97,15 +97,19 @@ internal abstract class Rygel.BasicManagementTest : Object {
protected virtual void finish_iteration () {
this.current_iteration++;
+ /* No more iterations if
+ * - init failed, recovery is impossible or
+ * - execution has been canceled,
+ * - execution has ended prematurely (skip remaining iterations),
+ * - the specified nr of iterations have been executed already
+ */
if (this.init_state != InitState.OK ||
- this.execution_state == ExecutionState.COMPLETED ||
- this.current_iteration >= this.iterations) {
- /* No more iterations if
- * - init failed, recovery is impossible or
- * - execution has ended (remaining iterations should be skipped)
- * - the specified nr of iterations have been executed already
- */
+ (this.current_iteration >= this.iterations &&
+ this.execution_state == ExecutionState.IN_PROGRESS)) {
this.execution_state = ExecutionState.COMPLETED;
+ }
+
+ if (this.execution_state != ExecutionState.IN_PROGRESS) {
this.async_callback ();
} else {
this.run_iteration ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]