summaryrefslogtreecommitdiff
path: root/cdr/cdr_tds.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2009-06-24 13:47:55 +0000
committerSean Bright <sean@malleable.com>2009-06-24 13:47:55 +0000
commit1fa4796b198e0f16a961878e03995502f86d4c5d (patch)
tree3d1fb64156934eea222eca355b161231906ee972 /cdr/cdr_tds.c
parent5059530d620d30d8ee3641cdc71b1a8a6e815b2b (diff)
Update sample cdr_tds configuration to try and eliminate some confusion.
Also change the preferred configuration option from 'hostname' (which was misleading because it didn't actually treat the value as a hostname) to 'connection' and added some verbage explaining that the user would need to refer to their freetds.conf file for those settings. 'hostname' was kept as a backwards compatible configuration parameter. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'cdr/cdr_tds.c')
-rw-r--r--cdr/cdr_tds.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c
index 408b255a4..17c569ac9 100644
--- a/cdr/cdr_tds.c
+++ b/cdr/cdr_tds.c
@@ -443,12 +443,19 @@ static int tds_load_module(int reload)
/* Clear out any existing settings */
ast_string_field_init(settings, 0);
- ptr = ast_variable_retrieve(cfg, "global", "hostname");
+ /* 'connection' is the new preferred configuration option */
+ ptr = ast_variable_retrieve(cfg, "global", "connection");
if (ptr) {
ast_string_field_set(settings, hostname, ptr);
} else {
- ast_log(LOG_ERROR, "Failed to connect: Database server hostname not specified.\n");
- goto failed;
+ /* But we keep 'hostname' for backwards compatibility */
+ ptr = ast_variable_retrieve(cfg, "global", "hostname");
+ if (ptr) {
+ ast_string_field_set(settings, hostname, ptr);
+ } else {
+ ast_log(LOG_ERROR, "Failed to connect: Database server connection not specified.\n");
+ goto failed;
+ }
}
ptr = ast_variable_retrieve(cfg, "global", "dbname");