Make sure other drivers also zero delivery (thanks to steven davies)
authorMark Spencer <markster@digium.com>
Thu, 24 Jun 2004 13:27:44 +0000 (13:27 +0000)
committerMark Spencer <markster@digium.com>
Thu, 24 Jun 2004 13:27:44 +0000 (13:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3295 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_alsa.c
channels/chan_modem_aopen.c
channels/chan_modem_bestdata.c
channels/chan_modem_i4l.c
channels/chan_nbs.c
channels/chan_oss.c
channels/chan_phone.c
channels/chan_vofr.c
channels/chan_vpb.c

index d78ee0f..4eb451e 100755 (executable)
@@ -664,6 +664,9 @@ static struct ast_frame *alsa_read(struct ast_channel *chan)
        f.offset = 0;
        f.src = type;
        f.mallocd = 0;
+        f.delivery.tv_sec = 0;
+        f.delivery.tv_usec = 0;
+
        
        if (needringing) {
                f.frametype = AST_FRAME_CONTROL;
index c123bfd..4d18137 100755 (executable)
@@ -190,6 +190,8 @@ static struct ast_frame *aopen_handle_escape(struct ast_modem_pvt *p, char esc)
        p->fr.samples = 0;
        p->fr.offset = 0;
        p->fr.mallocd = 0;
+        p->fr.delivery.tv_sec = 0;
+        p->fr.delivery.tv_usec = 0;
        if (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.datalen = p->obuflen;
                p->fr.mallocd = 0;
+               p->fr.delivery.tv_sec = 0;
+               p->fr.delivery.tv_usec = 0;
                p->fr.offset = AST_FRIENDLY_OFFSET;
                p->fr.src = __FUNCTION__;
                if (option_debug)
index 7eca765..2fde4d4 100755 (executable)
@@ -164,6 +164,8 @@ static struct ast_frame *bestdata_handle_escape(struct ast_modem_pvt *p, char es
        p->fr.samples = 0;
        p->fr.offset = 0;
        p->fr.mallocd = 0;
+       p->fr.delivery.tv_sec = 0;
+       p->fr.delivery.tv_usec = 0;
        if (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.datalen = p->obuflen;
                p->fr.mallocd = 0;
+               p->fr.delivery.tv_sec = 0;
+               p->fr.delivery.tv_usec = 0;
                p->fr.offset = AST_FRIENDLY_OFFSET;
                p->fr.src = __FUNCTION__;
                if (option_debug)
index ce7de41..892f4c0 100755 (executable)
@@ -236,6 +236,8 @@ static struct ast_frame *i4l_handle_escape(struct ast_modem_pvt *p, char esc)
        p->fr.samples = 0;
        p->fr.offset = 0;
        p->fr.mallocd = 0;
+       p->fr.delivery.tv_sec = 0;
+       p->fr.delivery.tv_usec = 0;
        if (esc && option_debug)
                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.datalen = p->obuflen;
                p->fr.mallocd = 0;
+               p->fr.delivery.tv_sec = 0;
+               p->fr.delivery.tv_usec = 0;
                p->fr.offset = AST_FRIENDLY_OFFSET;
                p->fr.src = __FUNCTION__;
                p->obuflen = 0;
index b30e1fa..3ec1555 100755 (executable)
@@ -160,6 +160,8 @@ static struct ast_frame  *nbs_xread(struct ast_channel *ast)
        p->fr.src = type;
        p->fr.offset = 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);
 
index 7bd7ddb..46d4e2c 100755 (executable)
@@ -615,6 +615,8 @@ static struct ast_frame *oss_read(struct ast_channel *chan)
        f.offset = 0;
        f.src = type;
        f.mallocd = 0;
+       f.delivery.tv_sec = 0;
+       f.delivery.tv_usec = 0;
        
        res = soundcard_setinput(0);
        if (res < 0) {
@@ -650,6 +652,8 @@ static struct ast_frame *oss_read(struct ast_channel *chan)
                f.offset = AST_FRIENDLY_OFFSET;
                f.src = type;
                f.mallocd = 0;
+               f.delivery.tv_sec = 0;
+               f.delivery.tv_usec = 0;
 #if 0
                { static int fd = -1;
                  if (fd < 0)
index 69c0884..536d3ef 100755 (executable)
@@ -368,6 +368,8 @@ static struct ast_frame  *phone_exception(struct ast_channel *ast)
        p->fr.src = type;
        p->fr.offset = 0;
        p->fr.mallocd=0;
+       p->fr.delivery.tv_sec = 0;
+       p->fr.delivery.tv_usec = 0;
 
        phonee.bytes = ioctl(p->fd, PHONE_EXCEPTION);
        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.offset = 0;
        p->fr.mallocd=0;
+       p->fr.delivery.tv_sec = 0;
+       p->fr.delivery.tv_usec = 0;
 
        /* Try to read some data... */
        CHECK_BLOCKING(ast);
index 43e7271..b249de1 100755 (executable)
@@ -587,6 +587,8 @@ retry:
        fr->src = type;
        fr->offset = 0;
        fr->mallocd=0;
+       fr->delivery.tv_sec = 0;
+       fr->delivery.tv_usec = 0;
        
        /* Now, what we do depends on what we read */
        switch(vh->dtype) {
index bd4576b..e256212 100755 (executable)
@@ -1568,6 +1568,8 @@ static void *do_chanreads(void *pvt)
        fr->frametype = AST_FRAME_VOICE;
        fr->src = type;
        fr->mallocd = 0;
+       fr->delivery.tv_sec = 0;
+       fr->delivery.tv_usec = 0;
        fr->samples = VPB_SAMPLES;
        fr->offset = AST_FRIENDLY_OFFSET;
        memset(p->buf, 0, sizeof p->buf);