aqhome-react: generalize command handling.

This commit is contained in:
Martin Preuss
2024-04-27 13:24:00 +02:00
parent 075fbc1cb5
commit a3d0fad984
2 changed files with 12 additions and 3 deletions

View File

@@ -125,7 +125,14 @@ int main(int argc, char **argv)
else if (rv>0) {
argc-=rv;
argv+=rv;
rv=_testModules(argc, argv);
s=GWEN_DB_GetCharValue(dbArgs, "params", 0, NULL);
if (s && *s && strcasecmp(s, "modtest")==0)
rv=_testModules(argc, argv);
else {
DBG_ERROR(NULL, "Invalid command \"%s\"", s?s:"<no command>");
return 1;
}
}
else {
s=GWEN_DB_GetCharValue(dbArgs, "charset", 0, NULL);