added actual tests and fixed reset-exclude funtction

This commit is contained in:
Andreas Antener
2015-02-04 09:33:14 +01:00
committed by Lorenz Meier
parent 28e943ca28
commit a7580a1eae
2 changed files with 111 additions and 8 deletions

View File

@@ -504,15 +504,22 @@ param_reset_excludes(const char* excludes[], int num_excludes)
for (param = 0; handle_in_range(param); param++) {
const char* name = param_name(param);
bool exclude = false;
for (int index = 0; index < num_excludes; index ++) {
int len = strlen(excludes[index]);
for (int index = 0, len = strlen(excludes[index]); index < num_excludes; index ++) {
if((excludes[index][len - 1] == '*'
&& strncmp(name, excludes[index], len - 1)) == 0
&& strncmp(name, excludes[index], len - 1) == 0)
|| strcmp(name, excludes[index]) == 0) {
param_reset(param);
exclude = true;
break;
}
}
if(!exclude) {
param_reset(param);
}
}
param_unlock();