don't dump non-existant channels (OPENZAP-47)

git-svn-id: http://svn.openzap.org/svn/openzap/trunk@645 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
Michael Jerris 2009-02-04 23:11:41 +00:00
parent 99c4419ae9
commit 59342977f6

View File

@ -2022,6 +2022,11 @@ static switch_status_t load_config(void)
void dump_chan(zap_span_t *span, uint32_t chan_id, switch_stream_handle_t *stream)
{
if (chan_id > span->chan_count) {
stream->write_function(stream, "ERROR\n");
return;
}
stream->write_function(stream,
"span_id: %u\n"
"chan_id: %u\n"