[Asterisk-Dev] Strange code in chan_zap.c

steve at daviesfam.org steve at daviesfam.org
Wed Sep 7 02:41:27 MST 2005


Hi,

I was looking into a PRI problem and noticed some rather strange code on 
chan_zap.c:

                case ZT_EVENT_NOALARM:
                        p->inalarm = 0;
#ifdef ZAPATA_PRI
                        /* Extremely unlikely but just in case */
                        if (p->bearer)
                                p->bearer->inalarm = 1;
#endif
                        ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", p->channel);
                        manager_event(EVENT_FLAG_SYSTEM, "AlarmClear",
                                                                "Channel: %d\r\n", p->channel);
                        break;


Now in the case of a ZT_EVENT_ALARM, the code puts the beaer in alarm too.  
But here in the case of ZT_EVENT_NOALARM I'd expect it to clear the bearer 
inalarm.  Instead, it also sets it.

I think this is an error; what say others?

Steve




More information about the asterisk-dev mailing list