[asterisk-commits] trunk r24053 - in /trunk: ./ apps/ res/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon May 1 14:48:31 MST 2006


Author: tilghman
Date: Mon May  1 16:48:30 2006
New Revision: 24053

URL: http://svn.digium.com/view/asterisk?rev=24053&view=rev
Log:
Merged revisions 24019 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r24019 | tilghman | 2006-05-01 15:44:24 -0500 (Mon, 01 May 2006) | 2 lines

Bug 6864 - drop realtime priority on ALL external processes

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_externalivr.c
    trunk/apps/app_festival.c
    trunk/apps/app_ices.c
    trunk/apps/app_mp3.c
    trunk/apps/app_nbscat.c
    trunk/apps/app_zapras.c
    trunk/asterisk.c
    trunk/res/res_musiconhold.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_externalivr.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_externalivr.c (original)
+++ trunk/apps/app_externalivr.c Mon May  1 16:48:30 2006
@@ -50,6 +50,7 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
+#include "asterisk/options.h"
 
 
 static const char *app = "ExternalIVR";
@@ -315,6 +316,9 @@
 	if (!pid) {
 		/* child process */
 		int i;
+
+		if (ast_opt_high_priority)
+			ast_set_priority(0);
 
 		dup2(child_stdin[0], STDIN_FILENO);
 		dup2(child_stdout[1], STDOUT_FILENO);

Modified: trunk/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_festival.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_festival.c (original)
+++ trunk/apps/app_festival.c Mon May  1 16:48:30 2006
@@ -55,6 +55,7 @@
 #include "asterisk/config.h"
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
+#include "asterisk/options.h"
 
 #define FESTIVAL_CONFIG "festival.conf"
 
@@ -140,6 +141,9 @@
                 if (x != fd)
                         close(x);
         }
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
+
 /*IAS */
 #ifdef __PPC__  
 	for( x=0; x<length; x+=2)

Modified: trunk/apps/app_ices.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_ices.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_ices.c (original)
+++ trunk/apps/app_ices.c Mon May  1 16:48:30 2006
@@ -46,6 +46,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define ICES "/usr/bin/ices"
 #define LOCAL_ICES "/usr/local/bin/ices"
@@ -70,6 +71,8 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 	dup2(fd, STDIN_FILENO);
 	for (x=STDERR_FILENO + 1;x<256;x++) {
 		if ((x != STDIN_FILENO) && (x != STDOUT_FILENO))

Modified: trunk/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_mp3.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_mp3.c (original)
+++ trunk/apps/app_mp3.c Mon May  1 16:48:30 2006
@@ -45,6 +45,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define LOCAL_MPG_123 "/usr/local/bin/mpg123"
 #define MPG_123 "/usr/bin/mpg123"
@@ -71,6 +72,8 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 	dup2(fd, STDOUT_FILENO);
 	for (x=0;x<256;x++) {
 		if (x != STDOUT_FILENO)

Modified: trunk/apps/app_nbscat.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_nbscat.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_nbscat.c (original)
+++ trunk/apps/app_nbscat.c Mon May  1 16:48:30 2006
@@ -46,6 +46,7 @@
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/translate.h"
+#include "asterisk/options.h"
 
 #define LOCAL_NBSCAT "/usr/local/bin/nbscat8k"
 #define NBSCAT "/usr/bin/nbscat8k"
@@ -75,6 +76,9 @@
 		ast_log(LOG_WARNING, "Fork failed\n");
 	if (res)
 		return res;
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
+
 	dup2(fd, STDOUT_FILENO);
 	for (x=0;x<256;x++) {
 		if (x != STDOUT_FILENO)

Modified: trunk/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_zapras.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/apps/app_zapras.c (original)
+++ trunk/apps/app_zapras.c Mon May  1 16:48:30 2006
@@ -99,6 +99,10 @@
 
 	/* Execute RAS on File handles */
 	dup2(chan->fds[0], STDIN_FILENO);
+
+	/* Drop high priority */
+	if (ast_opt_high_priority)
+		ast_set_priority(0);
 
 	/* Close other file descriptors */
 	for (x=STDERR_FILENO + 1;x<1024;x++) 

Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Mon May  1 16:48:30 2006
@@ -635,6 +635,8 @@
 	pid = fork();
 
 	if (pid == 0) {
+		if (ast_opt_high_priority)
+			ast_set_priority(0);
 		/* Close file descriptors and launch system command */
 		for (x = STDERR_FILENO + 1; x < 4096; x++)
 			close(x);

Modified: trunk/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_musiconhold.c?rev=24053&r1=24052&r2=24053&view=diff
==============================================================================
--- trunk/res/res_musiconhold.c (original)
+++ trunk/res/res_musiconhold.c Mon May  1 16:48:30 2006
@@ -436,6 +436,10 @@
 	}
 	if (!class->pid) {
 		int x;
+
+		if (ast_opt_high_priority)
+			ast_set_priority(0);
+
 		close(fds[0]);
 		/* Stdout goes to pipe */
 		dup2(fds[1], STDOUT_FILENO);



More information about the asterisk-commits mailing list