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:
Kevin P. Fleming
2006-12-12 22:58:49 +00:00
parent 3bb733a7c7
commit 05f6188c69
53 changed files with 562 additions and 313 deletions

View File

@@ -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]);