summaryrefslogtreecommitdiff
path: root/zaptel.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-05-09 21:25:32 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-05-09 21:25:32 +0000
commitcdac00624a92cffa9fe1a236f94da95f99da49e7 (patch)
tree9edd18095fb44e5eeb30248e43b76e082a0fb4cd /zaptel.c
parent45ac84c73d054ac5adc0f801c43435d7a5cf3059 (diff)
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
Diffstat (limited to 'zaptel.c')
-rwxr-xr-xzaptel.c3
1 files changed, 3 insertions, 0 deletions
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) {