diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-23 17:08:25 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-23 17:08:25 +0000 |
commit | 46091f64c6db363a03f01edb89dafb3bcea90d8d (patch) | |
tree | 0ff00613850ae52e42f1e199403280942b72dc57 /channels/chan_zap.c | |
parent | 1d054ae4f06d8254188fc3f1e574931668d3c2f0 (diff) |
report the actual channel number that was unregistered, instead of assuming that the interface list consists of channels 1 through <x> with no gaps in the sequence
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80501 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r-- | channels/chan_zap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 6c0967081..5a107f242 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -10304,8 +10304,9 @@ static int action_zapshowchannels(struct mansession *s, const struct message *m) static int __unload_module(void) { - int x = 0; + int x; struct zt_pvt *p, *pl; + #ifdef HAVE_PRI int i; for (i = 0; i < NUM_SPANS; i++) { @@ -10354,7 +10355,7 @@ static int __unload_module(void) zt_close(p->subs[SUB_REAL].zfd); pl = p; p = p->next; - x++; + x = pl->channel; /* Free associated memory */ if (pl) destroy_zt_pvt(&pl); |