[asterisk-commits] branch oej/cdr_radius r28438 - in
/team/oej/cdr_radius: cdr/ configs/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu May 18 18:34:55 MST 2006
Author: russell
Date: Thu May 18 20:34:54 2006
New Revision: 28438
URL: http://svn.digium.com/view/asterisk?rev=28438&view=rev
Log:
move the radiuscfg option from radius.conf to cdr.conf, to live with the
rest of the options for this module
Removed:
team/oej/cdr_radius/configs/radius.conf.sample
Modified:
team/oej/cdr_radius/cdr/cdr_radius.c
team/oej/cdr_radius/configs/cdr.conf.sample
Modified: team/oej/cdr_radius/cdr/cdr_radius.c
URL: http://svn.digium.com/view/asterisk/team/oej/cdr_radius/cdr/cdr_radius.c?rev=28438&r1=28437&r2=28438&view=diff
==============================================================================
--- team/oej/cdr_radius/cdr/cdr_radius.c (original)
+++ team/oej/cdr_radius/cdr/cdr_radius.c Thu May 18 20:34:54 2006
@@ -106,7 +106,6 @@
static char *desc = "RADIUS CDR Backend";
static char *name = "radius";
-static char *radius_config = "radius.conf";
static char *cdr_config = "cdr.conf";
static char radiuscfg[AST_CONFIG_MAX_PATH] = "/etc/radiusclient-ng/radiusclient.conf";
@@ -314,8 +313,11 @@
struct ast_config *cfg;
char *tmp;
- if ((cfg = ast_config_load(radius_config))) {
- if ((tmp = ast_variable_retrieve(cfg, "global", "radiuscfg")))
+ if ((cfg = ast_config_load(cdr_config))) {
+ global_usegmtime = ast_true(ast_variable_retrieve(cfg, "radius", "usegmtime"));
+ global_loguniqueid = ast_true(ast_variable_retrieve(cfg, "radius", "loguniqueid"));
+ global_loguserfield = ast_true(ast_variable_retrieve(cfg, "radius", "loguserfield"));
+ if ((tmp = ast_variable_retrieve(cfg, "radius", "radiuscfg")))
ast_copy_string(radiuscfg, tmp, sizeof(radiuscfg));
ast_config_destroy(cfg);
}
@@ -334,17 +336,6 @@
ast_log(LOG_NOTICE, "Cannot load radiusclient-ng dictionary file.\n");
return -1;
}
-
- if (!(cfg = ast_config_load(cdr_config))) {
- ast_log(LOG_WARNING,"Unable to load CDR config: %s\n", cdr_config);
- return 0;
- }
-
- global_usegmtime = ast_true(ast_variable_retrieve(cfg, "radius", "usegmtime"));
- global_loguniqueid = ast_true(ast_variable_retrieve(cfg, "radius", "loguniqueid"));
- global_loguserfield = ast_true(ast_variable_retrieve(cfg, "radius", "loguserfield"));
-
- ast_config_destroy(cfg);
return ast_cdr_register(name, desc, radius_log);
}
Modified: team/oej/cdr_radius/configs/cdr.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/cdr_radius/configs/cdr.conf.sample?rev=28438&r1=28437&r2=28438&view=diff
==============================================================================
--- team/oej/cdr_radius/configs/cdr.conf.sample (original)
+++ team/oej/cdr_radius/configs/cdr.conf.sample Thu May 18 20:34:54 2006
@@ -65,4 +65,7 @@
;usegmtime=yes ;log date/time in GMT
;loguniqueid=yes ;log uniqueid
;loguserfield=yes ;log user field
+; Set this to the location of the radiusclient-ng configuration file
+; The default is /etc/radiusclient-ng/radiusclient.conf
+;radiuscfg => /usr/local/etc/radiusclient-ng/radiusclient.conf
More information about the asterisk-commits
mailing list