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:
parent
c334ae7745
commit
cfc1495bc6
|
@ -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)
|
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,
|
stream->write_function(stream,
|
||||||
"span_id: %u\n"
|
"span_id: %u\n"
|
||||||
"chan_id: %u\n"
|
"chan_id: %u\n"
|
||||||
|
|
Loading…
Reference in New Issue