From: Richard Mudgett Date: Wed, 12 Oct 2011 20:08:33 +0000 (+0000) Subject: Initialize the PRI channel alarms properly on startup. X-Git-Tag: 10.0.0-rc1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8a317f87d038540c0e2f337fbec2720b807af2;p=thirdparty%2Fasterisk.git Initialize the PRI channel alarms properly on startup. The PRI channel alarms were initialized with an inverted sense. (closes issue ASTERISK-18710) Reported by: Tzafrir Cohen ........ Merged revisions 340522 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@340523 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 3cfdf0c799..05b992402d 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -12897,20 +12897,12 @@ static struct dahdi_pvt *mkintf(int channel, const struct dahdi_chan_conf *conf, } } ioctl(tmp->subs[SUB_REAL].dfd,DAHDI_SETTONEZONE,&tmp->tonezone); -#ifdef HAVE_PRI - memset(&si, 0, sizeof(si)); - if (ioctl(tmp->subs[SUB_REAL].dfd,DAHDI_SPANSTAT,&si) == -1) { - ast_log(LOG_ERROR, "Unable to get span status: %s\n", strerror(errno)); - destroy_dahdi_pvt(tmp); - return NULL; - } -#endif if ((res = get_alarms(tmp)) != DAHDI_ALARM_NONE) { /* the dchannel is down so put the channel in alarm */ switch (tmp->sig) { #ifdef HAVE_PRI case SIG_PRI_LIB_HANDLE_CASES: - sig_pri_set_alarm(tmp->sig_pvt, !si.alarms); + sig_pri_set_alarm(tmp->sig_pvt, 1); break; #endif #if defined(HAVE_SS7)