[Asterisk-cvs] asterisk asterisk.c,1.59,1.60

markster at lists.digium.com markster at lists.digium.com
Sat Mar 20 16:17:33 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv14473

Modified Files:
	asterisk.c 
Log Message:
Correctly handle call flow with outgoing queue, avoiding retries while call acti
ve (bug #1018)


Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- asterisk.c	20 Mar 2004 07:26:54 -0000	1.59
+++ asterisk.c	20 Mar 2004 21:13:12 -0000	1.60
@@ -65,7 +65,7 @@
 
 static int ast_socket = -1;		/* UNIX Socket for allowing remote control */
 static int ast_consock = -1;		/* UNIX Socket for controlling another asterisk */
-static int mainpid;
+int ast_mainpid;
 struct console {
 	int fd;					/* File descriptor */
 	int p[2];				/* Pipe */
@@ -196,7 +196,7 @@
 	
 	if (gethostname(hostname, sizeof(hostname)))
 		strncpy(hostname, "<Unknown>", sizeof(hostname)-1);
-	snprintf(tmp, sizeof(tmp), "%s/%d/%s\n", hostname, mainpid, ASTERISK_VERSION);
+	snprintf(tmp, sizeof(tmp), "%s/%d/%s\n", hostname, ast_mainpid, ASTERISK_VERSION);
 	fdprint(con->fd, tmp);
 	for(;;) {
 		FD_ZERO(&rfds);	
@@ -1271,7 +1271,7 @@
 	}
 	if (gethostname(hostname, sizeof(hostname)))
 		strncpy(hostname, "<Unknown>", sizeof(hostname)-1);
-	mainpid = getpid();
+	ast_mainpid = getpid();
 	ast_ulaw_init();
 	ast_alaw_init();
 	callerid_init();
@@ -1500,7 +1500,7 @@
 		/* Register our quit function */
 		char title[256];
 		set_icon("Asterisk");
-		snprintf(title, sizeof(title), "Asterisk Console on '%s' (pid %d)", hostname, mainpid);
+		snprintf(title, sizeof(title), "Asterisk Console on '%s' (pid %d)", hostname, ast_mainpid);
 		set_title(title);
 	    ast_cli_register(&quit);
 	    ast_cli_register(&astexit);




More information about the svn-commits mailing list