[Asterisk-cvs] asterisk manager.c,1.41,1.42

citats at lists.digium.com citats at lists.digium.com
Mon Apr 5 15:40:22 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/home/citats/cvs/asterisk

Modified Files:
	manager.c 
Log Message:
Allow manager.conf to use port and portno, but log that portno is deprecated.
(bug 1343)


Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- manager.c	9 Mar 2004 20:01:46 -0000	1.41
+++ manager.c	5 Apr 2004 19:40:30 -0000	1.42
@@ -976,11 +976,17 @@
 	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;




More information about the svn-commits mailing list