diff mbox

[-,ucm,1/1] ucm: set active_verb when set_verb was successful

Message ID 1401900745-22796-1-git-send-email-nrubinstein@aldebaran-robotics.com (mailing list archive)
State New, archived
Headers show

Commit Message

nrubinstein@aldebaran-robotics.com June 4, 2014, 4:52 p.m. UTC
From: Noé Rubinstein <nrubinstein@aldebaran-robotics.com>

This seems to be a bug: execute_sequence returns zero on success,
therefore the current code changes the active_verb iff execute_sequence
failed.

Signed-off-by: Noé Rubinstein <nrubinstein@aldebaran-robotics.com>
diff mbox

Patch

diff --git a/src/ucm/main.c b/src/ucm/main.c
index 0494728..3c0d7e4 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -623,7 +623,7 @@  static int set_verb(snd_use_case_mgr_t *uc_mgr,
 			       &verb->value_list,
 			       &uc_mgr->value_list,
 			       NULL);
-	if (enable && err >= 0)
+	if (enable && err == 0)
 		uc_mgr->active_verb = verb;
 	return err;
 }