fix off by one index

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@554 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-09-10 19:43:55 +00:00
parent 97958e56e0
commit b645cacc11
2 changed files with 2 additions and 2 deletions

View File

@ -399,7 +399,7 @@ static L3INT zap_isdn_931_34(void *pvt, L2UCHAR *msg, L2INT mlen)
zap_set_state_locked(zchan, ZAP_CHANNEL_STATE_RESTART);
} else {
uint32_t i;
for (i = 0; i < span->chan_count; i++) {
for (i = 1; i < span->chan_count; i++) {
zap_set_state_locked((span->channels[i]), ZAP_CHANNEL_STATE_RESTART);
}
}

View File

@ -142,7 +142,7 @@ static zap_channel_t *find_zchan(zap_span_t *span, ss7bc_short_event_t *event, i
zap_channel_t *zchan = NULL;
zap_mutex_lock(signal_mutex);
for(i = 0; i <= span->chan_count; i++) {
for(i = 1; i <= span->chan_count; i++) {
if (span->channels[i]->physical_span_id == event->span+1 && span->channels[i]->physical_chan_id == event->chan+1) {
zchan = span->channels[i];
if (force) {