Skip to contentSkip to conversation

UCM: Fix typo in error message

PATCH New Stephen Warren 1 participant 2 messages Jun 2, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 UCM: Fix typo in error message

parse_name_is_safe disallows dots in the name, so not is the correct word to use

---
 src/ucm/parser.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
src/ucm/parser.c +1 -1
index 38fdba0..f7de9bd 100644
@@ -62,7 +62,7 @@ int parse_string(snd_config_t *n, char **res)
 int parse_is_name_safe(char *name)
 {
 	if (strchr(name, '.')) {
-		uc_error("char '.' now allowed in '%s'", name);
+		uc_error("char '.' not allowed in '%s'", name);
 		return 0;
 	}
 	return 1;
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/2 UCM: Fix deadlock following failed get _verb

When querying the current verb without a verb set, snd_use_case_get bails out early without unlocking uc_mgr->mutex. This causes subsequent API calls to hang. Instead, s/return/goto __end/.

---
 src/ucm/main.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
src/ucm/main.c +4 -2
index f8ceeeb..fb4aa91 100644
@@ -1132,8 +1132,10 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
                 }
                 err = 0;
         } else if (strcmp(identifier, "_verb") == 0) {
-                if (uc_mgr->active_verb == NULL)
-                        return -ENOENT;
+                if (uc_mgr->active_verb == NULL) {
+                        err = -ENOENT;
+			goto __end;
+		}
                 *value = strdup(uc_mgr->active_verb->name);
                 if (*value == NULL) {
                         err = -ENOMEM;
Signature · 1 line
1.7.0.4