From cdac00624a92cffa9fe1a236f94da95f99da49e7 Mon Sep 17 00:00:00 2001 From: markster Date: Fri, 9 May 2003 21:25:32 +0000 Subject: Be sure to clear out txdialbuf and dialing whenever we play a tone. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@176 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- zaptel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zaptel.c b/zaptel.c index b8982ec..141ca96 100755 --- a/zaptel.c +++ b/zaptel.c @@ -938,6 +938,8 @@ static int start_tone(struct zt_chan *chan, int tone) /* Stop the current tone, no matter what */ chan->tonep = 0; chan->curtone = NULL; + chan->txdialbuf[0] = '\0'; + chan->dialing = 0; if ((tone >= ZT_TONE_MAX) || (tone < -1)) return -EINVAL; /* Just wanted to stop the tone anyway */ @@ -1465,6 +1467,7 @@ static ssize_t zt_chan_write(struct file *file, const char *usrbuf, size_t count if (chan->curtone && !(chan->flags & ZT_FLAG_PSEUDO)) { chan->curtone = NULL; chan->tonep = 0; + chan->dialing = 0; chan->txdialbuf[0] = '\0'; } if (chan->eventinidx != chan->eventoutidx) { -- cgit v1.2.3