Merged revisions 186081 via svnmerge from
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 2 Apr 2009 17:26:07 +0000 (17:26 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 2 Apr 2009 17:26:07 +0000 (17:26 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r186081 | kpfleming | 2009-04-02 12:21:29 -0500 (Thu, 02 Apr 2009) | 3 lines

  ensure that the buffer passed to DAHDI_SET_BUFINFO is fully initialized
........

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

channels/chan_dahdi.c

index 0796742..e4d03ad 100644 (file)
@@ -13429,6 +13429,7 @@ static int start_pri(struct dahdi_pri *pri)
                        pri->dchanavail[i] |= DCHAN_NOTINALARM;
                else
                        pri->dchanavail[i] &= ~DCHAN_NOTINALARM;
+               memset(&bi, 0, sizeof(bi));
                bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
                bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
                bi.numbufs = 32;
@@ -15320,6 +15321,7 @@ static int linkset_addsigchan(int sigchan)
                        return -1;
                }
 
+               memset(&bi, 0, sizeof(bi));
                bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
                bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
                bi.numbufs = 32;