mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user