[Common-dev] Fwd: Re: Crash in CHXSocket. (when writing to a closed socket.)
Sujeet Kharkar skharkar at real.comI will like to check in following change done by Tom Marshall to common/netio/platform/posix/sockimp.cpp This fixes the crash in CHXSocket, which was occuring if writing to a closed socket. I have verified the fix on windows & linux with producer. Thanks Sujeet >Delivered-To: skharkar at real.com >Date: Fri, 17 Sep 2004 11:15:58 -0700 >From: Tom Marshall <tmarshall at real.com> >To: Sujeet Kharkar <skharkar at real.com> >Subject: Re: Crash in CHXSocket. >User-Agent: Mutt/1.5.6+20040722i >Sender: Tom Marshall <tommy at hashi.dev.prognet.com> > >On Thu, Sep 16, 2004 at 02:59:27PM -0700, Sujeet Kharkar wrote: > > At 11:43 AM 9/16/2004 -0700, you wrote: > > > > So will you be fixing this one. > > I can verify it once fixed. > >This should fix the socket crash (item 1): > > Index: platform/posix/sockimp.cpp > =================================================================== > RCS file: /cvsroot/common/netio/platform/posix/sockimp.cpp,v > retrieving revision 1.44 > diff -u -d -r1.44 sockimp.cpp > --- platform/posix/sockimp.cpp 8 Sep 2004 00:05:55 -0000 1.44 > +++ platform/posix/sockimp.cpp 17 Sep 2004 18:14:13 -0000 > @@ -1116,6 +1116,7 @@ > CHXSocket::~CHXSocket(void) > { > Close(); > + HX_DELETE(m_pSendBuffer); > HX_RELEASE(m_pScheduler); > HX_RELEASE(m_pCCF); > HX_RELEASE(m_punkContext); > @@ -1620,7 +1621,6 @@ > CHXSocket::Close(void) > { > HX_RESULT hxr = HXR_OK; > - HX_DELETE(m_pSendBuffer); > HX_RELEASE(m_pEnumerator); //XXXTDM: need to cancel > HX_RELEASE(m_pResponse); > if (m_hIdleCallback) > >Feel free to test and then send out a CR. > >If you won't be fixing the others, you should file bugs. > >-- >You can complain because roses have thorns, or you can rejoice because >thorns have roses. > -- Abraham Lincoln