Skip to content
Snippets Groups Projects
Commit b5da1073 authored by James Golovich's avatar James Golovich
Browse files

Allow manager.conf to use port and portno, but log that portno is deprecated.

(bug 1343)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent dc383a7e
No related branches found
No related tags found
No related merge requests found
......@@ -976,11 +976,17 @@ int init_manager(void)
if(val)
block_sockets = ast_true(val);
if ((val = ast_variable_retrieve(cfg, "general", "portno"))) {
if ((val = ast_variable_retrieve(cfg, "general", "port"))) {
if (sscanf(val, "%d", &portno) != 1) {
ast_log(LOG_WARNING, "Invalid port number '%s'\n", val);
portno = DEFAULT_MANAGER_PORT;
}
} else if ((val = ast_variable_retrieve(cfg, "general", "portno"))) {
if (sscanf(val, "%d", &portno) != 1) {
ast_log(LOG_WARNING, "Invalid port number '%s'\n", val);
portno = DEFAULT_MANAGER_PORT;
}
ast_log(LOG_NOTICE, "Use of portno in manager.conf deprecated. Please use 'port=%s' instead.\n", val);
}
ba.sin_family = AF_INET;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment