mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
load_keys: avoid hiding a global variable
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
@@ -770,22 +770,22 @@ int serve_request_worker(sec_mod_st *sec, int cfd, pid_t pid, uint8_t *buffer, u
|
|||||||
|
|
||||||
static int load_keys(sec_mod_st *sec, unsigned force)
|
static int load_keys(sec_mod_st *sec, unsigned force)
|
||||||
{
|
{
|
||||||
unsigned i, need_reload;
|
unsigned i, reload_file;
|
||||||
int ret;
|
int ret;
|
||||||
vhost_cfg_st *vhost = NULL;
|
vhost_cfg_st *vhost = NULL;
|
||||||
|
|
||||||
list_for_each_rev(sec->vconfig, vhost, list) {
|
list_for_each_rev(sec->vconfig, vhost, list) {
|
||||||
if (force == 0) {
|
if (force == 0) {
|
||||||
need_reload = 0;
|
reload_file = 0;
|
||||||
|
|
||||||
for (i = 0; i < vhost->perm_config.key_size; i++) {
|
for (i = 0; i < vhost->perm_config.key_size; i++) {
|
||||||
if (need_file_reload(vhost->perm_config.key[i], vhost->cert_last_access) != 0) {
|
if (need_file_reload(vhost->perm_config.key[i], vhost->cert_last_access) != 0) {
|
||||||
need_reload = 1;
|
reload_file = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_reload == 0)
|
if (reload_file == 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user