From 2710e0997b69326ff7103229508e43b511903278 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 29 Oct 2020 15:32:36 -0400 Subject: [PATCH] mi: When {en,dis}abling extensions, match names case-insensitively Both because extension names are inconsistently capitalized on the wire, and because the table we're walking spells it COMPOSITE not Composite. The latter is certainly also a bug, but there's no reason for us to be that strict. [mustard: backport to 1.20.4 - ajax] Signed-off-by: Adam Jackson --- mi/miinitext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mi/miinitext.c b/mi/miinitext.c index b7c7021..3a7f83f 100644 --- a/mi/miinitext.c +++ b/mi/miinitext.c @@ -215,7 +215,7 @@ EnableDisableExtensionError(const char *name, Bool enable) for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) { ext = &staticExtensions[i]; - if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) { + if ((strcasecmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) { ErrorF("[mi] Extension \"%s\" can not be disabled\n", name); found = TRUE; break; -- 2.23.0