stop when we reach the end of our spans

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@388 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2008-02-05 17:54:15 +00:00
parent 099dae4b99
commit fa839992e0
1 changed files with 5 additions and 5 deletions

View File

@ -695,11 +695,6 @@ zap_status_t zap_channel_open_any(uint32_t span_id, zap_direction_t direction, z
}
for(;;) {
span = &globals.spans[j];
if (!zap_test_flag(span, ZAP_SPAN_CONFIGURED)) {
goto next_loop;
}
if (direction == ZAP_TOP_DOWN) {
if (j > span_max) {
break;
@ -710,6 +705,11 @@ zap_status_t zap_channel_open_any(uint32_t span_id, zap_direction_t direction, z
}
}
span = &globals.spans[j];
if (!zap_test_flag(span, ZAP_SPAN_CONFIGURED)) {
goto next_loop;
}
if (direction == ZAP_TOP_DOWN) {
i = 1;
} else {