]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
use the ZT_SET_DIALPARAMS ioctl properly by initializing the structure to all zeroes...
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 16 Apr 2008 20:46:38 +0000 (20:46 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 16 Apr 2008 20:46:38 +0000 (20:46 +0000)
(closes issue #12456)
Reported by: fnordian

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114184 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_zap.c

index a0b69af1a651ce9cc52566c121158dfe3347919b..a7012436893cbc8aa2f2d903ef5cdca16b6665ab 100644 (file)
@@ -11216,6 +11216,8 @@ static int process_zap(struct zt_chan_conf *confp, struct ast_variable *v, int r
 
                                toneduration = atoi(v->value);
                                if (toneduration > -1) {
+                                       memset(&dps, 0, sizeof(dps));
+
                                        dps.dtmf_tonelen = dps.mfv1_tonelen = toneduration;
                                        res = ioctl(ctlfd, ZT_SET_DIALPARAMS, &dps);
                                        if (res < 0) {