diff options
Diffstat (limited to 'channels/chan_zap.c')
-rwxr-xr-x | channels/chan_zap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index f90b48a09..de9f0f4c1 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -7337,7 +7337,9 @@ static int pri_find_principle(struct zt_pri *pri, int channel) if (!PRI_EXPLICIT(channel)) { spanfd = pri_active_dchan_fd(pri); - span = ioctl(spanfd, ZT_GET_PARAMS, ¶m); + if (ioctl(spanfd, ZT_GET_PARAMS, ¶m)) + return -1; + span = param.spanno - 1; } for (x=0;x<pri->numchans;x++) { |