summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEivind Naess <eivnaes@yahoo.com>2023-04-23 11:37:01 -0700
committerEivind Naess <eivnaes@yahoo.com>2023-04-23 11:37:01 -0700
commit7f89208b860ea0c41636410bfdb6a609b2772f47 (patch)
tree9fbcdd03bdecea8ce0e2eeea38aa3ab607b2f051
parent9d6d326b2530cffb1414e4c401675117c42d43ce (diff)
downloadppp-7f89208b860ea0c41636410bfdb6a609b2772f47.tar.gz
Closes #411, Fixing up parsing in radiusclient.conf
Adding curly braces to fix the code. Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
-rw-r--r--pppd/plugins/radius/config.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c
index 39744fc..e1a4814 100644
--- a/pppd/plugins/radius/config.c
+++ b/pppd/plugins/radius/config.c
@@ -235,24 +235,28 @@ int rc_read_config(char *filename)
switch (option->type) {
case OT_STR:
- if (set_option_str(filename, line, option, p) < 0)
+ if (set_option_str(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_INT:
- if (set_option_int(filename, line, option, p) < 0)
+ if (set_option_int(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_SRV:
- if (set_option_srv(filename, line, option, p) < 0)
+ if (set_option_srv(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
case OT_AUO:
- if (set_option_auo(filename, line, option, p) < 0)
+ if (set_option_auo(filename, line, option, p) < 0) {
fclose(configfd);
return (-1);
+ }
break;
default:
fatal("rc_read_config: impossible case branch!");