mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
Make sure other drivers also zero delivery (thanks to steven davies)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -664,6 +664,9 @@ static struct ast_frame *alsa_read(struct ast_channel *chan)
|
|||||||
f.offset = 0;
|
f.offset = 0;
|
||||||
f.src = type;
|
f.src = type;
|
||||||
f.mallocd = 0;
|
f.mallocd = 0;
|
||||||
|
f.delivery.tv_sec = 0;
|
||||||
|
f.delivery.tv_usec = 0;
|
||||||
|
|
||||||
|
|
||||||
if (needringing) {
|
if (needringing) {
|
||||||
f.frametype = AST_FRAME_CONTROL;
|
f.frametype = AST_FRAME_CONTROL;
|
||||||
|
@@ -190,6 +190,8 @@ static struct ast_frame *aopen_handle_escape(struct ast_modem_pvt *p, char esc)
|
|||||||
p->fr.samples = 0;
|
p->fr.samples = 0;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
if (esc)
|
if (esc)
|
||||||
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
||||||
|
|
||||||
@@ -319,6 +321,8 @@ static struct ast_frame *aopen_read(struct ast_modem_pvt *p)
|
|||||||
p->fr.data = p->obuf;
|
p->fr.data = p->obuf;
|
||||||
p->fr.datalen = p->obuflen;
|
p->fr.datalen = p->obuflen;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
p->fr.offset = AST_FRIENDLY_OFFSET;
|
p->fr.offset = AST_FRIENDLY_OFFSET;
|
||||||
p->fr.src = __FUNCTION__;
|
p->fr.src = __FUNCTION__;
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
|
@@ -164,6 +164,8 @@ static struct ast_frame *bestdata_handle_escape(struct ast_modem_pvt *p, char es
|
|||||||
p->fr.samples = 0;
|
p->fr.samples = 0;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
if (esc)
|
if (esc)
|
||||||
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
||||||
|
|
||||||
@@ -369,6 +371,8 @@ static struct ast_frame *bestdata_read(struct ast_modem_pvt *p)
|
|||||||
p->fr.data = p->obuf;
|
p->fr.data = p->obuf;
|
||||||
p->fr.datalen = p->obuflen;
|
p->fr.datalen = p->obuflen;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
p->fr.offset = AST_FRIENDLY_OFFSET;
|
p->fr.offset = AST_FRIENDLY_OFFSET;
|
||||||
p->fr.src = __FUNCTION__;
|
p->fr.src = __FUNCTION__;
|
||||||
if (option_debug)
|
if (option_debug)
|
||||||
|
@@ -236,6 +236,8 @@ static struct ast_frame *i4l_handle_escape(struct ast_modem_pvt *p, char esc)
|
|||||||
p->fr.samples = 0;
|
p->fr.samples = 0;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
if (esc && option_debug)
|
if (esc && option_debug)
|
||||||
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
ast_log(LOG_DEBUG, "Escaped character '%c'\n", esc);
|
||||||
|
|
||||||
@@ -438,6 +440,8 @@ static struct ast_frame *i4l_read(struct ast_modem_pvt *p)
|
|||||||
p->fr.data = p->obuf;
|
p->fr.data = p->obuf;
|
||||||
p->fr.datalen = p->obuflen;
|
p->fr.datalen = p->obuflen;
|
||||||
p->fr.mallocd = 0;
|
p->fr.mallocd = 0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
p->fr.offset = AST_FRIENDLY_OFFSET;
|
p->fr.offset = AST_FRIENDLY_OFFSET;
|
||||||
p->fr.src = __FUNCTION__;
|
p->fr.src = __FUNCTION__;
|
||||||
p->obuflen = 0;
|
p->obuflen = 0;
|
||||||
|
@@ -160,6 +160,8 @@ static struct ast_frame *nbs_xread(struct ast_channel *ast)
|
|||||||
p->fr.src = type;
|
p->fr.src = type;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd=0;
|
p->fr.mallocd=0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
|
|
||||||
ast_log(LOG_DEBUG, "Returning null frame on %s\n", ast->name);
|
ast_log(LOG_DEBUG, "Returning null frame on %s\n", ast->name);
|
||||||
|
|
||||||
|
@@ -615,6 +615,8 @@ static struct ast_frame *oss_read(struct ast_channel *chan)
|
|||||||
f.offset = 0;
|
f.offset = 0;
|
||||||
f.src = type;
|
f.src = type;
|
||||||
f.mallocd = 0;
|
f.mallocd = 0;
|
||||||
|
f.delivery.tv_sec = 0;
|
||||||
|
f.delivery.tv_usec = 0;
|
||||||
|
|
||||||
res = soundcard_setinput(0);
|
res = soundcard_setinput(0);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
@@ -650,6 +652,8 @@ static struct ast_frame *oss_read(struct ast_channel *chan)
|
|||||||
f.offset = AST_FRIENDLY_OFFSET;
|
f.offset = AST_FRIENDLY_OFFSET;
|
||||||
f.src = type;
|
f.src = type;
|
||||||
f.mallocd = 0;
|
f.mallocd = 0;
|
||||||
|
f.delivery.tv_sec = 0;
|
||||||
|
f.delivery.tv_usec = 0;
|
||||||
#if 0
|
#if 0
|
||||||
{ static int fd = -1;
|
{ static int fd = -1;
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
@@ -368,6 +368,8 @@ static struct ast_frame *phone_exception(struct ast_channel *ast)
|
|||||||
p->fr.src = type;
|
p->fr.src = type;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd=0;
|
p->fr.mallocd=0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
|
|
||||||
phonee.bytes = ioctl(p->fd, PHONE_EXCEPTION);
|
phonee.bytes = ioctl(p->fd, PHONE_EXCEPTION);
|
||||||
if (phonee.bits.dtmf_ready) {
|
if (phonee.bits.dtmf_ready) {
|
||||||
@@ -429,6 +431,8 @@ static struct ast_frame *phone_read(struct ast_channel *ast)
|
|||||||
p->fr.src = type;
|
p->fr.src = type;
|
||||||
p->fr.offset = 0;
|
p->fr.offset = 0;
|
||||||
p->fr.mallocd=0;
|
p->fr.mallocd=0;
|
||||||
|
p->fr.delivery.tv_sec = 0;
|
||||||
|
p->fr.delivery.tv_usec = 0;
|
||||||
|
|
||||||
/* Try to read some data... */
|
/* Try to read some data... */
|
||||||
CHECK_BLOCKING(ast);
|
CHECK_BLOCKING(ast);
|
||||||
|
@@ -587,6 +587,8 @@ retry:
|
|||||||
fr->src = type;
|
fr->src = type;
|
||||||
fr->offset = 0;
|
fr->offset = 0;
|
||||||
fr->mallocd=0;
|
fr->mallocd=0;
|
||||||
|
fr->delivery.tv_sec = 0;
|
||||||
|
fr->delivery.tv_usec = 0;
|
||||||
|
|
||||||
/* Now, what we do depends on what we read */
|
/* Now, what we do depends on what we read */
|
||||||
switch(vh->dtype) {
|
switch(vh->dtype) {
|
||||||
|
@@ -1568,6 +1568,8 @@ static void *do_chanreads(void *pvt)
|
|||||||
fr->frametype = AST_FRAME_VOICE;
|
fr->frametype = AST_FRAME_VOICE;
|
||||||
fr->src = type;
|
fr->src = type;
|
||||||
fr->mallocd = 0;
|
fr->mallocd = 0;
|
||||||
|
fr->delivery.tv_sec = 0;
|
||||||
|
fr->delivery.tv_usec = 0;
|
||||||
fr->samples = VPB_SAMPLES;
|
fr->samples = VPB_SAMPLES;
|
||||||
fr->offset = AST_FRIENDLY_OFFSET;
|
fr->offset = AST_FRIENDLY_OFFSET;
|
||||||
memset(p->buf, 0, sizeof p->buf);
|
memset(p->buf, 0, sizeof p->buf);
|
||||||
|
Reference in New Issue
Block a user