aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-23 17:07:32 +0000
committermattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-23 17:07:32 +0000
commit5a1a8b26d9b61ef0b357d43bf2e883a4f4bb684a (patch)
tree4517bca04eb29d2c648d37db12d44c5392e1a41a /channels
parent561ca6ce2be355771959c337f40344185139cab6 (diff)
Bug in pri_find_principle
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5755 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_zap.c4
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, &param);
+ if (ioctl(spanfd, ZT_GET_PARAMS, &param))
+ return -1;
+ span = param.spanno - 1;
}
for (x=0;x<pri->numchans;x++) {