[Asterisk-cvs] asterisk/channels chan_zap.c,1.331,1.332
markster at lists.digium.com
markster at lists.digium.com
Thu Sep 2 16:42:13 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv14593/channels
Modified Files:
chan_zap.c
Log Message:
Don't try to look offhook with channel banks & Loopstart (bug #2362), also make individual modules reloadable...
Index: chan_zap.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_zap.c,v
retrieving revision 1.331
retrieving revision 1.332
diff -u -d -r1.331 -r1.332
--- chan_zap.c 2 Sep 2004 19:07:24 -0000 1.331
+++ chan_zap.c 2 Sep 2004 20:45:24 -0000 1.332
@@ -6291,6 +6291,8 @@
#endif
if (!p->radio)
{
+ if (!p->sig || (p->sig == SIG_FXSLS))
+ return 1;
/* Check hook state */
if (p->subs[SUB_REAL].zfd > -1)
res = ioctl(p->subs[SUB_REAL].zfd, ZT_GET_PARAMS, &par);
@@ -6301,10 +6303,12 @@
}
if (res) {
ast_log(LOG_WARNING, "Unable to check hook state on channel %d\n", p->channel);
- } else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSLS) ||
- (p->sig == SIG_FXSGS) || !p->sig) {
+ } else if ((p->sig == SIG_FXSKS) || (p->sig == SIG_FXSGS)) {
/* When "onhook" that means no battery on the line, and thus
- it is out of service... */
+ it is out of service..., if it's on a TDM card... If it's a channel
+ bank, there is no telling... */
+ if (par.rxbits > -1)
+ return 1;
if (par.rxisoffhook)
return 1;
else
More information about the svn-commits
mailing list