diff options
author | Doug Bailey <dbailey@digium.com> | 2009-01-27 15:23:40 +0000 |
---|---|---|
committer | Doug Bailey <dbailey@digium.com> | 2009-01-27 15:23:40 +0000 |
commit | 906d6654771d4a64956e175218cf5de5784bf99a (patch) | |
tree | 6c3bf883bdff4d6f49c6d4726ad836c05b3cf285 /channels | |
parent | a0a8a4d68e10b2c7e08e3014f06c9c800d18383f (diff) |
Handle new VMWI ioctl structure (Now there are two VMWI ioctl calls.)
(issue #14104)
Reported by: alecdavis
Tested by: dbailey
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@171558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_dahdi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 0d7012675..edd32880e 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -8249,21 +8249,12 @@ static void *do_monitor(void *data) !ast_strlen_zero(last->mailbox) && (thispass - last->onhooktime > 3)) { res = has_voicemail(last); if (last->msgstate != res) { -#ifndef HAVE_DAHDI_LINEREVERSE_VMWI /* Set driver resources for signalling VMWI */ res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &res); if (res2) { /* TODO: This message will ALWAYS be generated on some cards; any way to restrict it to those cards where it is interesting? */ ast_debug(3, "Unable to control message waiting led on channel %d: %s\n", last->channel, strerror(errno)); } -#else - last->mwisend_setting.messages = res; - res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &last->mwisend_setting); - if (res2) { - /* TODO: This message will ALWAYS be generated on some cards; any way to restrict it to those cards where it is interesting? */ - ast_debug(3, "Unable to control MWI on channel %d: %s\n", last->channel, strerror(errno)); - } -#endif /* If enabled for FSK spill then initiate it */ if (mwi_send_init(last)) { ast_log(LOG_WARNING, "Unable to initiate mwi send sequence on channel %d\n", last->channel); @@ -9031,6 +9022,9 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf, if (!res) { tmp->fxsoffhookstate = p.rxisoffhook; } +#ifdef HAVE_DAHDI_LINEREVERSE_VMWI + res = ioctl(tmp->subs[SUB_REAL].dfd, DAHDI_VMWI_CONFIG, &tmp->mwisend_setting); +#endif } tmp->onhooktime = time(NULL); tmp->group = conf->chan.group; |