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
This commit is contained in:
Sean Bright
2009-06-24 13:47:55 +00:00
parent 5059530d62
commit 1fa4796b19
2 changed files with 73 additions and 9 deletions

View File

@@ -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");