mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
manual update, since automerge is not running at this time
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@48421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include "asterisk.h"
|
||||
|
||||
@@ -152,7 +153,7 @@ static int gen_nextfile(struct gen_state *state)
|
||||
if (state->current) {
|
||||
file_to_stream = state->current->filename;
|
||||
} else {
|
||||
file_to_stream = "silence-10";
|
||||
file_to_stream = "silence/10";
|
||||
u->playing_silence = 1;
|
||||
}
|
||||
|
||||
@@ -258,9 +259,13 @@ static int app_exec(struct ast_channel *chan, void *data)
|
||||
FILE *child_commands = NULL;
|
||||
FILE *child_errors = NULL;
|
||||
FILE *child_events = NULL;
|
||||
sigset_t fullset, oldset;
|
||||
|
||||
LOCAL_USER_ADD(u);
|
||||
|
||||
|
||||
sigfillset(&fullset);
|
||||
pthread_sigmask(SIG_BLOCK, &fullset, &oldset);
|
||||
|
||||
AST_LIST_HEAD_INIT(&u->playlist);
|
||||
AST_LIST_HEAD_INIT(&u->finishlist);
|
||||
u->abort_current_sound = 0;
|
||||
@@ -314,6 +319,9 @@ static int app_exec(struct ast_channel *chan, void *data)
|
||||
/* child process */
|
||||
int i;
|
||||
|
||||
signal(SIGPIPE, SIG_DFL);
|
||||
pthread_sigmask(SIG_UNBLOCK, &fullset, NULL);
|
||||
|
||||
if (option_highpriority)
|
||||
ast_set_priority(0);
|
||||
|
||||
@@ -337,6 +345,8 @@ static int app_exec(struct ast_channel *chan, void *data)
|
||||
int waitfds[2] = { child_errors_fd, child_commands_fd };
|
||||
struct ast_channel *rchan;
|
||||
|
||||
pthread_sigmask(SIG_SETMASK, &oldset, NULL);
|
||||
|
||||
close(child_stdin[0]);
|
||||
child_stdin[0] = 0;
|
||||
close(child_stdout[1]);
|
||||
|
Reference in New Issue
Block a user