From 6d8afd1035094cd98142d60ef22b9522c4bf6823 Mon Sep 17 00:00:00 2001 From: mbloch Date: Wed, 30 May 2012 13:03:02 +0100 Subject: [PATCH] Fixed bug where ACL was accidentally deleted when being set from control socket. --- control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control.c b/control.c index 79986fa..b980fba 100644 --- a/control.c +++ b/control.c @@ -261,7 +261,7 @@ int control_mirror(struct control_params* client, int linesc, char** lines) /** Command parser to alter access control list from socket input */ int control_acl(struct control_params* client, int linesc, char** lines) { - int acl_entries = 0, parsed; + int parsed; struct ip_and_mask (*acl)[], (*old_acl)[]; parsed = parse_acl(&acl, linesc, lines); @@ -275,7 +275,7 @@ int control_acl(struct control_params* client, int linesc, char** lines) else { old_acl = client->serve->acl; client->serve->acl = acl; - client->serve->acl_entries = acl_entries; + client->serve->acl_entries = linesc; free(old_acl); write_socket("0: updated"); }