aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-24 13:47:55 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2009-06-24 13:47:55 +0000
commit8e9ec1d622072e1d13127ca6af25246e46e51393 (patch)
tree3d1fb64156934eea222eca355b161231906ee972 /cdr
parent59155c3ce5bb66d9f41b8562dd41373c4f8ba58f (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: http://svn.digium.com/svn/asterisk/trunk@202887 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cdr')
-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");