mirror of
https://github.com/openNDS/openNDS.git
synced 2026-01-10 20:37:54 -05:00
Add - Dynamic refresh of configured preemptive macs
Signed-off-by: Rob White <rob@blue-wave.net>
This commit is contained in:
17
src/auth.c
17
src/auth.c
@@ -292,7 +292,8 @@ fw_refresh_client_list(void)
|
||||
unsigned long long int downrate;
|
||||
int action;
|
||||
char *dnscmd;
|
||||
|
||||
char *pmaccmd;
|
||||
char msg[MID_BUF];
|
||||
|
||||
// Check if router is online
|
||||
int watchdog = 1;
|
||||
@@ -675,6 +676,20 @@ fw_refresh_client_list(void)
|
||||
}
|
||||
|
||||
UNLOCK_CLIENT_LIST();
|
||||
|
||||
|
||||
memset(msg, 0, MID_BUF);
|
||||
get_list_from_config(msg, MID_BUF, "preemptivemac");
|
||||
|
||||
if (strcmp(msg, "") == 0) {
|
||||
debug(LOG_DEBUG, "preemptivemaclist is empty");
|
||||
} else {
|
||||
// Refresh preemptivemacs
|
||||
pmaccmd = safe_calloc(STATUS_BUF);
|
||||
safe_snprintf(pmaccmd, STATUS_BUF, "/usr/lib/opennds/libopennds.sh preemptivemac");
|
||||
system(pmaccmd);
|
||||
free(pmaccmd);
|
||||
}
|
||||
}
|
||||
|
||||
/** Launched in its own thread.
|
||||
|
||||
Reference in New Issue
Block a user