Merged revisions 24019 via svnmerge from
[asterisk/asterisk.git] / apps / app_externalivr.c
index ef35637..7a9757e 100644 (file)
@@ -50,6 +50,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/linkedlists.h"
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
+#include "asterisk/options.h"
 
 
 static const char *app = "ExternalIVR";
@@ -316,6 +317,9 @@ static int app_exec(struct ast_channel *chan, void *data)
                /* 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);
                dup2(child_stderr[1], STDERR_FILENO);