https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r80501 | kpfleming | 2007-08-23 12:08:25 -0500 (Thu, 23 Aug 2007) | 2 lines
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: https://origsvn.digium.com/svn/asterisk/trunk@80508
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
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++) {
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);