diff --git a/libs/ysig/isup.cpp b/libs/ysig/isup.cpp index 2269f8dd..831929f2 100644 --- a/libs/ysig/isup.cpp +++ b/libs/ysig/isup.cpp @@ -3613,7 +3613,6 @@ void SS7ISUP::destroyed() clearCalls(); unlock(); SignallingCallControl::attach(0); - SS7Layer4::attach(0); SS7Layer4::destroyed(); } diff --git a/libs/ysig/layer4.cpp b/libs/ysig/layer4.cpp index 234006e4..03791f29 100644 --- a/libs/ysig/layer4.cpp +++ b/libs/ysig/layer4.cpp @@ -37,6 +37,12 @@ SS7Layer4::SS7Layer4(unsigned char sio, const NamedList* params) m_sio = getSIO(*params,sio); } +void SS7Layer4::destroyed() +{ + attach(0); + SignallingComponent::destroyed(); +} + unsigned char SS7Layer4::getSIO(const NamedList& params, unsigned char sif, unsigned char prio, unsigned char ni) { if ((prio & 0x30) == 0) diff --git a/libs/ysig/yatesig.h b/libs/ysig/yatesig.h index 04f866bb..51ec29bc 100644 --- a/libs/ysig/yatesig.h +++ b/libs/ysig/yatesig.h @@ -703,7 +703,7 @@ protected: * This method is called to clean up and destroy the object after the * reference counter becomes zero */ - void destroyed(); + virtual void destroyed(); /** * Insert another component in the same engine as this one. @@ -6008,6 +6008,12 @@ private: class YSIG_API SS7Layer4 : public SS7L3User { public: + /** + * This method is called to clean up and destroy the object after the + * reference counter becomes zero + */ + virtual void destroyed(); + /** * Initialize the application layer, connect it to the SS7 router * @param config Optional configuration parameters override