diff options
author | Dima Panov <fluffy@FreeBSD.org> | 2020-02-24 15:12:22 +0000 |
---|---|---|
committer | Dima Panov <fluffy@FreeBSD.org> | 2020-02-24 15:12:22 +0000 |
commit | 16b08b022363c98d1b65f688c2e6f5db42c78f8f (patch) | |
tree | 09d4b89f70c937fb714b15257e786f34a524524c /net/freeradius-client/files/patch-lib__config.c | |
parent | - Update to latest release (diff) |
net/freeradius-client: unbreak fetch, update to 1.1.7 release
Maintainer didn't unbreak the port over 3 months since it was marked unfetchable,
version 1.1.7 was released 26.05.2017
Approved by: maintainer (timeout)
MFH: 2020Q1
Diffstat (limited to 'net/freeradius-client/files/patch-lib__config.c')
-rw-r--r-- | net/freeradius-client/files/patch-lib__config.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/freeradius-client/files/patch-lib__config.c b/net/freeradius-client/files/patch-lib__config.c index 337918e4c654..fd564f2c8e21 100644 --- a/net/freeradius-client/files/patch-lib__config.c +++ b/net/freeradius-client/files/patch-lib__config.c @@ -1,6 +1,6 @@ ---- lib/config.c +--- lib/config.c.orig 2015-01-19 16:18:26 UTC +++ lib/config.c -@@ -106,7 +106,7 @@ +@@ -106,7 +106,7 @@ static int set_option_srv(char const *filename, int li serv = (SERVER *) option->val; if (serv == NULL) { DEBUG(LOG_ERR, "option->val / server is NULL, allocating memory"); @@ -9,10 +9,10 @@ if (serv == NULL) { rc_log(LOG_CRIT, "read_config: out of memory"); free(p_dupe); -@@ -313,8 +313,8 @@ +@@ -319,8 +319,8 @@ rc_config_init(rc_handle *rh) - authservers = rc_conf_srv(rh, "authserver"); - acctservers = rc_conf_srv(rh, "acctserver"); + acct = find_option(rh, "acctserver", OT_ANY); + auth = find_option(rh, "authserver", OT_ANY); - authservers = malloc(sizeof(SERVER)); - acctservers = malloc(sizeof(SERVER)); + authservers = calloc(1, sizeof(SERVER)); @@ -20,16 +20,16 @@ if(authservers == NULL || acctservers == NULL) { -@@ -491,7 +491,7 @@ - option = find_option(rh, optname, OT_INT|OT_AUO); +@@ -504,7 +504,7 @@ int rc_conf_int(rc_handle const *rh, char const *optna if (option != NULL) { -- return *((int *)option->val); -+ return option->val ? *((int *)option->val) : 0; - } else { - rc_log(LOG_CRIT, "rc_conf_int: unkown config option requested: %s", optname); - abort(); -@@ -528,17 +528,21 @@ + if (option->val) { +- return *((int *)option->val); ++ return option->val ? *((int *)option->val) : 0; + } else { + rc_log(LOG_ERR, "rc_conf_int: config option %s was not set", optname); + return 0; +@@ -545,17 +545,21 @@ int test_config(rc_handle const *rh, char const *filen struct stat st; char *file; #endif |