Revert some silly code that snuck into trunk from my working copy. Sorry!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
5e33b09261
commit
3b91d3b5ab
25
main/file.c
25
main/file.c
|
@ -320,7 +320,6 @@ static void filestream_destructor(void *arg)
|
||||||
free(f->filename);
|
free(f->filename);
|
||||||
if (f->realfilename)
|
if (f->realfilename)
|
||||||
free(f->realfilename);
|
free(f->realfilename);
|
||||||
ast_free(f->open_filename);
|
|
||||||
if (f->fmt->close) {
|
if (f->fmt->close) {
|
||||||
void (*closefn)(struct ast_filestream *) = f->fmt->close;
|
void (*closefn)(struct ast_filestream *) = f->fmt->close;
|
||||||
closefn(f);
|
closefn(f);
|
||||||
|
@ -473,7 +472,6 @@ static int ast_filehelper(const char *filename, const void *arg2, const char *fm
|
||||||
s->fmt = f;
|
s->fmt = f;
|
||||||
s->trans = NULL;
|
s->trans = NULL;
|
||||||
s->filename = NULL;
|
s->filename = NULL;
|
||||||
s->open_filename = ast_strdup(fn);;
|
|
||||||
if (s->fmt->format & AST_FORMAT_AUDIO_MASK) {
|
if (s->fmt->format & AST_FORMAT_AUDIO_MASK) {
|
||||||
if (chan->stream)
|
if (chan->stream)
|
||||||
ast_closestream(chan->stream);
|
ast_closestream(chan->stream);
|
||||||
|
@ -828,30 +826,7 @@ static int ast_fsread_video(const void *data)
|
||||||
|
|
||||||
int ast_applystream(struct ast_channel *chan, struct ast_filestream *s)
|
int ast_applystream(struct ast_channel *chan, struct ast_filestream *s)
|
||||||
{
|
{
|
||||||
struct ast_party_connected_line connected;
|
|
||||||
char *fn;
|
|
||||||
|
|
||||||
ast_channel_lock(chan);
|
|
||||||
ast_party_connected_line_set_init(&connected, &chan->connected);
|
|
||||||
if (ast_strlen_zero(chan->connected.id.number)) {
|
|
||||||
connected.id.number = ast_strdupa(chan->exten);
|
|
||||||
}
|
|
||||||
ast_channel_unlock(chan);
|
|
||||||
|
|
||||||
fn = ast_strdupa(s->open_filename);
|
|
||||||
if ((fn = strrchr(fn, '/'))) {
|
|
||||||
char *dot;
|
|
||||||
*fn++ = '\0';
|
|
||||||
if ((dot = strrchr(fn, '.'))) {
|
|
||||||
*dot = '\0';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
connected.id.number = connected.id.name = fn;
|
|
||||||
|
|
||||||
ast_channel_update_connected_line(chan, &connected);
|
|
||||||
|
|
||||||
s->owner = chan;
|
s->owner = chan;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue