Merged revisions 118163 via svnmerge from
authorJeff Peeler <jpeeler@digium.com>
Fri, 23 May 2008 21:26:39 +0000 (21:26 +0000)
committerJeff Peeler <jpeeler@digium.com>
Fri, 23 May 2008 21:26:39 +0000 (21:26 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r118163 | jpeeler | 2008-05-23 16:21:35 -0500 (Fri, 23 May 2008) | 1 line

Fix a few things I missed to ensure zt_chan_conf structure is not modified in mkintf
........

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

channels/chan_zap.c

index a5ce2b3..b9860f3 100644 (file)
@@ -8213,13 +8213,13 @@ static struct zt_pvt *mkintf(int channel, const struct zt_chan_conf *conf, struc
                        }
 #endif
 #ifdef HAVE_PRI
                        }
 #endif
 #ifdef HAVE_PRI
-                       if ((conf->chan.sig == SIG_PRI) || (conf->chan.sig == SIG_BRI) || (conf->chan.sig == SIG_BRI_PTMP) || (conf->chan.sig == SIG_GR303FXOKS) || (conf->chan.sig == SIG_GR303FXSKS)) {
+                       if ((chan_sig == SIG_PRI) || (chan_sig == SIG_BRI) || (chan_sig == SIG_BRI_PTMP) || (chan_sig == SIG_GR303FXOKS) || (chan_sig == SIG_GR303FXSKS)) {
                                int offset;
                                int myswitchtype;
                                int matchesdchan;
                                int x,y;
                                offset = 0;
                                int offset;
                                int myswitchtype;
                                int matchesdchan;
                                int x,y;
                                offset = 0;
-                               if (((conf->chan.sig == SIG_PRI) || (conf->chan.sig == SIG_BRI) || (conf->chan.sig == SIG_BRI_PTMP)) 
+                               if (((chan_sig == SIG_PRI) || (chan_sig == SIG_BRI) || (chan_sig == SIG_BRI_PTMP)) 
                                                && ioctl(tmp->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &offset)) {
                                        ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, p.spanno, strerror(errno));
                                        destroy_zt_pvt(&tmp);
                                                && ioctl(tmp->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &offset)) {
                                        ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, p.spanno, strerror(errno));
                                        destroy_zt_pvt(&tmp);
@@ -8244,9 +8244,9 @@ static struct zt_pvt *mkintf(int channel, const struct zt_chan_conf *conf, struc
                                                destroy_zt_pvt(&tmp);
                                                return NULL;
                                        }
                                                destroy_zt_pvt(&tmp);
                                                return NULL;
                                        }
-                                       if ((conf->chan.sig == SIG_PRI) ||
-                                                       (conf->chan.sig == SIG_BRI) ||
-                                                       (conf->chan.sig == SIG_BRI_PTMP))
+                                       if ((chan_sig == SIG_PRI) ||
+                                                       (chan_sig == SIG_BRI) ||
+                                                       (chan_sig == SIG_BRI_PTMP))
                                                myswitchtype = conf->pri.switchtype;
                                        else
                                                myswitchtype = PRI_SWITCH_GR303_TMC;
                                                myswitchtype = conf->pri.switchtype;
                                        else
                                                myswitchtype = PRI_SWITCH_GR303_TMC;