Summary: | ASTERISK-13229: [patch] unable to set DAHDI_VMWI to lower level drivers | ||
Reporter: | Alec Davis (alecdavis) | Labels: | |
Date Opened: | 2008-12-16 03:44:51.000-0600 | Date Closed: | 2009-04-02 08:57:08 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_dahdi |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) chan_dahdi.VMWI_ioctl.diff.txt | |
Description: | The ioctl to set DAHDI_VMWI is missing an '&' in do_monitor res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, res); should be res2 = ioctl(last->subs[SUB_REAL].dfd, DAHDI_VMWI, &res); As is the case with every other ioctl. ****** ADDITIONAL INFORMATION ****** Which causes the low level driver ioctl which I am working on to fail at the get_user data. Example below: case DAHDI_VMWI: /* value: 0=none/off, NZ=number of messages */ if (get_user(x, (__user int *) data)) { printk(KERN_DEBUG "Setting VMWI error get_user\n"); return -EFAULT; } if (wc->modtype[chan->chanpos - 1] != MOD_TYPE_FXS) { printk(KERN_DEBUG "Setting VMWI error modtype\n"); return -EINVAL; } wc->mod[chan->chanpos - 1].fxs.vmwimessages = x; /* if (debug) */ printk(KERN_DEBUG "Setting VMWI on channel %d to %d \n", chan->chanpos-1, x); break; Alec | ||
Comments: | By: Digium Subversion (svnbot) 2008-12-16 08:17:43.000-0600 Repository: asterisk Revision: 164602 U trunk/channels/chan_dahdi.c ------------------------------------------------------------------------ r164602 | russell | 2008-12-16 08:17:43 -0600 (Tue, 16 Dec 2008) | 7 lines Fix usage of the DAHDI_VMWI ioctl. (closes issue ASTERISK-13229) Reported by: alecdavis Patches: chan_dahdi.VMWI_ioctl.diff.txt uploaded by alecdavis (license 585) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=164602 By: Digium Subversion (svnbot) 2009-04-02 08:57:08 Repository: asterisk Revision: 185960 _U branches/1.6.0/ U branches/1.6.0/channels/chan_dahdi.c ------------------------------------------------------------------------ r185960 | kpfleming | 2009-04-02 08:57:07 -0500 (Thu, 02 Apr 2009) | 14 lines Merged revisions 164602 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r164602 | russell | 2008-12-16 08:17:45 -0600 (Tue, 16 Dec 2008) | 7 lines Fix usage of the DAHDI_VMWI ioctl. (closes issue ASTERISK-13229) Reported by: alecdavis Patches: chan_dahdi.VMWI_ioctl.diff.txt uploaded by alecdavis (license 585) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=185960 |