Bug 998

Summary: Deallocating Ipv4Endpoint sometimes causes TcpSocketImpl's own destructor to be called
Product: ns-3 Reporter: Michele Weigle <mweigle>
Component: internetAssignee: Adrian S.-W. Tam <adrian.sw.tam>
Status: VERIFIED FIXED    
Severity: normal CC: tomh
Priority: P5 Keywords: patch
Version: ns-3.9   
Hardware: All   
OS: All   
Attachments: Modification to tcp-socket-impl.cc

Description Michele Weigle 2010-09-17 16:33:34 UTC
Created attachment 983 [details]
Modification to tcp-socket-impl.cc

Slightly modified the order in which things are destroyed/zeroed when TcpSocketImpl is fully closed. This was already a fairly gnarly piece of code with a 7-line comment block attached to it, so I'm a little less
sure of this one. Deallocating the Ipv4Endpoint would sometimes result in the TcpSocketImpl's own destructor being called due to Ptr reference counting; changing the order of events _here_ allowed this to happen without the destructor failing an assertion. Attached as tcp-socket-deallocate.diff
Comment 1 Tom Henderson 2011-08-09 14:40:52 UTC
need to confirm if this is still valid
Comment 2 Adrian S.-W. Tam 2011-12-10 21:49:24 UTC
Fixed in TcpSocketBase