# rename the variable 'p' in mkintf() to 'params'. # This patch should have no functional effect. Index: trunk/channels/chan_zap.c =================================================================== --- trunk.orig/channels/chan_zap.c 2008-02-27 02:29:40.469495879 +0200 +++ trunk/channels/chan_zap.c 2008-02-27 02:31:08.974539727 +0200 @@ -8067,7 +8067,7 @@ static struct zt_pvt *mkintf(int channel int x; struct zt_pvt **wlist; struct zt_pvt **wend; - ZT_PARAMS p; + ZT_PARAMS params; wlist = &iflist; wend = &ifend; @@ -8122,23 +8122,23 @@ static struct zt_pvt *mkintf(int channel destroy_zt_pvt(&tmp); return NULL; } - memset(&p, 0, sizeof(p)); - res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_GET_PARAMS, &p); + memset(¶ms, 0, sizeof(params)); + res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_GET_PARAMS, ¶ms); if (res < 0) { ast_log(LOG_ERROR, "Unable to get parameters\n"); destroy_zt_pvt(&tmp); return NULL; } if (conf.is_sig_auto) - conf.chan.sig = sigtype_to_signalling(p.sigtype); - if (p.sigtype != (conf.chan.sig & 0x3ffff)) { - ast_log(LOG_ERROR, "Signalling requested on channel %d is %s but line is in %s signalling\n", channel, sig2str(conf.chan.sig), sig2str(p.sigtype)); + conf.chan.sig = sigtype_to_signalling(params.sigtype); + if (params.sigtype != (conf.chan.sig & 0x3ffff)) { + ast_log(LOG_ERROR, "Signalling requested on channel %d is %s but line is in %s signalling\n", channel, sig2str(conf.chan.sig), sig2str(params.sigtype)); destroy_zt_pvt(&tmp); return NULL; } - tmp->law = p.curlaw; - tmp->span = p.spanno; - span = p.spanno - 1; + tmp->law = params.curlaw; + tmp->span = params.spanno; + span = params.spanno - 1; } else { if (channel == CHAN_PSEUDO) conf.chan.sig = 0; @@ -8152,7 +8152,7 @@ static struct zt_pvt *mkintf(int channel struct zt_ss7 *ss7; int clear = 0; if (ioctl(tmp->subs[SUB_REAL].zfd, ZT_AUDIOMODE, &clear)) { - ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, p.spanno, strerror(errno)); + ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, params.spanno, strerror(errno)); destroy_zt_pvt(&tmp); return NULL; } @@ -8196,7 +8196,7 @@ static struct zt_pvt *mkintf(int channel offset = 0; if (((conf.chan.sig == SIG_PRI) || (conf.chan.sig == SIG_BRI) || (conf.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)); + ast_log(LOG_ERROR, "Unable to set clear mode on clear channel %d of span %d: %s\n", channel, params.spanno, strerror(errno)); destroy_zt_pvt(&tmp); return NULL; } @@ -8213,7 +8213,7 @@ static struct zt_pvt *mkintf(int channel } /* Store the logical span first based upon the real span */ tmp->logicalspan = pris[span].prilogicalspan; - pri_resolve_span(&span, channel, (channel - p.chanpos), &si); + pri_resolve_span(&span, channel, (channel - params.chanpos), &si); if (span < 0) { ast_log(LOG_WARNING, "Channel %d: Unable to find locate channel/trunk group!\n", channel); destroy_zt_pvt(&tmp); @@ -8235,7 +8235,7 @@ static struct zt_pvt *mkintf(int channel } } } - offset = p.chanpos; + offset = params.chanpos; if (!matchesdchan) { if (pris[span].nodetype && (pris[span].nodetype != conf.pri.nodetype)) { ast_log(LOG_ERROR, "Span %d is already a %s node\n", span + 1, pri_node2str(pris[span].nodetype)); @@ -8315,9 +8315,9 @@ static struct zt_pvt *mkintf(int channel } else { conf.chan.sig = tmp->sig; conf.chan.radio = tmp->radio; - memset(&p, 0, sizeof(p)); + memset(¶ms, 0, sizeof(params)); if (tmp->subs[SUB_REAL].zfd > -1) - res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_GET_PARAMS, &p); + res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_GET_PARAMS, ¶ms); } /* Adjust starttime on loopstart and kewlstart trunks to reasonable values */ if ((conf.chan.sig == SIG_FXSKS) || (conf.chan.sig == SIG_FXSLS) || @@ -8327,41 +8327,41 @@ static struct zt_pvt *mkintf(int channel (conf.chan.sig == SIG_SF) || (conf.chan.sig == SIG_SFWINK) || (conf.chan.sig == SIG_FGC_CAMA) || (conf.chan.sig == SIG_FGC_CAMAMF) || (conf.chan.sig == SIG_SF_FEATD) || (conf.chan.sig == SIG_SF_FEATDMF) || (conf.chan.sig == SIG_SF_FEATB)) { - p.starttime = 250; + params.starttime = 250; } if (conf.chan.radio) { /* XXX Waiting to hear back from Jim if these should be adjustable XXX */ - p.channo = channel; - p.rxwinktime = 1; - p.rxflashtime = 1; - p.starttime = 1; - p.debouncetime = 5; + params.channo = channel; + params.rxwinktime = 1; + params.rxflashtime = 1; + params.starttime = 1; + params.debouncetime = 5; } if (!conf.chan.radio) { - p.channo = channel; + params.channo = channel; /* Override timing settings based on config file */ if (conf.timing.prewinktime >= 0) - p.prewinktime = conf.timing.prewinktime; + params.prewinktime = conf.timing.prewinktime; if (conf.timing.preflashtime >= 0) - p.preflashtime = conf.timing.preflashtime; + params.preflashtime = conf.timing.preflashtime; if (conf.timing.winktime >= 0) - p.winktime = conf.timing.winktime; + params.winktime = conf.timing.winktime; if (conf.timing.flashtime >= 0) - p.flashtime = conf.timing.flashtime; + params.flashtime = conf.timing.flashtime; if (conf.timing.starttime >= 0) - p.starttime = conf.timing.starttime; + params.starttime = conf.timing.starttime; if (conf.timing.rxwinktime >= 0) - p.rxwinktime = conf.timing.rxwinktime; + params.rxwinktime = conf.timing.rxwinktime; if (conf.timing.rxflashtime >= 0) - p.rxflashtime = conf.timing.rxflashtime; + params.rxflashtime = conf.timing.rxflashtime; if (conf.timing.debouncetime >= 0) - p.debouncetime = conf.timing.debouncetime; + params.debouncetime = conf.timing.debouncetime; } /* dont set parms on a pseudo-channel (or CRV) */ if (tmp->subs[SUB_REAL].zfd >= 0) { - res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_SET_PARAMS, &p); + res = ioctl(tmp->subs[SUB_REAL].zfd, ZT_SET_PARAMS, ¶ms); if (res < 0) { ast_log(LOG_ERROR, "Unable to set parameters\n"); destroy_zt_pvt(&tmp);