Restart PRI when we come out of alarm if we're not already up...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-09-13 02:20:37 +00:00
parent 8ac8621f40
commit 04e4a54ae8

View File

@@ -2205,6 +2205,8 @@ int pri_find_dchan(struct zt_pri *pri)
ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n", ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
pri->dchannels[oldslot], pri->dchannels[newslot]); pri->dchannels[oldslot], pri->dchannels[newslot]);
pri->pri = pri->dchans[newslot]; pri->pri = pri->dchans[newslot];
if (!pri_is_up(pri) && !(pri->dchanavail[newslot] & DCHAN_NOTINALARM))
pri_restart(pri->dchans[newslot]);
return 0; return 0;
} }
#endif #endif
@@ -7706,7 +7708,7 @@ static void *do_idle_thread(void *vchan)
return NULL; return NULL;
} }
#ifndef PRI_NEW_SET_API #ifndef PRI_RESTART
#error "Upgrade your libpri" #error "Upgrade your libpri"
#endif #endif
static void zt_pri_message(struct pri *pri, char *s) static void zt_pri_message(struct pri *pri, char *s)