mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
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:
@@ -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");
|
||||
|
Reference in New Issue
Block a user