summaryrefslogtreecommitdiffstats
path: root/mISDN.cpp
diff options
context:
space:
mode:
authorAndreas Eversberg2009-09-30 14:23:23 +0200
committerAndreas Eversberg2009-09-30 14:23:23 +0200
commit10ee69aef58f52cb24326ec11a356d0813e3f54d (patch)
tree4b3039661c91547f511c1509031a5b481dfe99b3 /mISDN.cpp
parentAdded support for signalling system no. 5. (diff)
downloadlcr-10ee69aef58f52cb24326ec11a356d0813e3f54d.tar.gz
lcr-10ee69aef58f52cb24326ec11a356d0813e3f54d.tar.xz
lcr-10ee69aef58f52cb24326ec11a356d0813e3f54d.zip
Fixed bug when closing mISDN port.
modified: mISDN.cpp
Diffstat (limited to 'mISDN.cpp')
-rw-r--r--mISDN.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mISDN.cpp b/mISDN.cpp
index c92e427..ce885d9 100644
--- a/mISDN.cpp
+++ b/mISDN.cpp
@@ -2378,13 +2378,15 @@ void mISDNport_close(struct mISDNport *mISDNport)
int i;
/* remove all port instance that are linked to this mISDNport */
+ again:
port = port_first;
while(port) {
if ((port->p_type&PORT_CLASS_MASK) == PORT_CLASS_mISDN) {
isdnport = (class PmISDN *)port;
- if (isdnport->p_m_mISDNport) {
+ if (isdnport->p_m_mISDNport && isdnport->p_m_mISDNport == mISDNport) {
PDEBUG(DEBUG_ISDN, "port %s uses mISDNport %d, destroying it.\n", isdnport->p_name, mISDNport->portnum);
delete isdnport;
+ goto again;
}
}
port = port->next;