Log when service name pattern doesn't match
This commit is contained in:
parent
f67269202e
commit
a2c5773b03
3
daemon.c
3
daemon.c
@ -148,6 +148,7 @@ static void parseControl(char *command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (command) {
|
while (command) {
|
||||||
|
bool found = false;
|
||||||
char *pattern = strsep(&command, WS);
|
char *pattern = strsep(&command, WS);
|
||||||
for (size_t i = 0; i < services.len; ++i) {
|
for (size_t i = 0; i < services.len; ++i) {
|
||||||
struct Service *service = &services.ptr[i];
|
struct Service *service = &services.ptr[i];
|
||||||
@ -157,7 +158,9 @@ static void parseControl(char *command) {
|
|||||||
} else {
|
} else {
|
||||||
fn(service);
|
fn(service);
|
||||||
}
|
}
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
|
if (!found) syslog(LOG_NOTICE, "no services matching %s", pattern);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user