[Common-dev] CR: Client Bug 19 [splay incorrectly reports "invalid host" when server refuses connection]
Anil Jaiswal ajaiswal at real.comHi, Since EricH (client side) is OK with the changes and TomM (server side) is also OK with the changes, should I go ahead and check in the changes into Head and 150Cay branches? Thanks and regards ~Anil At 12:28 PM 8/16/2005, Tom Marshall wrote: >On Tue, Aug 16, 2005 at 11:58:26AM -0700, Anil Jaiswal wrote: > > Hi Tom, > > Should I go ahead and check in the changes for fix [PR 19] to Head and > > 150Cay branches? > >I think it might be cleaner to make the status code a member of the >CHXSocketConnectEnumerator class but this looks functional also. > >Note I am not responsible for the client branches. > >-- >When competing for a section of road or a parking space, remember that the >vehicle in need of the most body work has the right-of-way. > -- Massachusetts Driver Education Manual > At 08:24 AM 8/15/2005, Eric Hyche wrote: >Looks OK to me, but since this is in critical >code shared by server and client teams, I want >someone on the server team familiar with the socket >code to chime in before committing this. > >Passing all connect errors straight through may >have unexpected side-effects in the server code. >Tom? > >Eric > > > -----Original Message----- > > From: common-dev-bounces at helixcommunity.org > > [mailto:common-dev-bounces at helixcommunity.org] On Behalf Of > > Anil Jaiswal > > Sent: Thursday, August 11, 2005 10:59 PM > > To: filesystem-dev at helixcommunity.org; common-dev at helixcommunity.org > > Subject: [Common-dev] CR: Client Bug 19 [splay incorrectly > > reports "invalid host" when server refuses connection] > > > > Modified by: ajaiswal at real.com > > Reviewed by: > > Date: 08-11-2005 > > > > Synopsis: > > When running splay with a http URL to a web server which > > intentionally has not been properly configured to listen on a > > certain subnet, the error reported by "splay" is a misleading > > "invalid host", when in fact it should be "connection refused". > > > > Fix: > > Connect call was properly handled in sockimp.cpp however > > the error code was not properly propagated to the app. > > These changes fixes the problem and application now display > > correct error message as "HXR_SOCK_CONNREFUSED". > > > > Files Modified: > > filesystem/http/httpfsys.cpp > > common/netio/platform/posix/sockimp.cpp > > common/netio/pub/platform/posix/sockimp.h > > > > Image Size and Heap Use impact: > > none > > > > Platforms and Profiles Affected: > > all platforms, all profiles > > > > Platforms and Profiles Build Verified: > > Linux, Windows > > helix-client-all-defines.pf > > > > Platforms and Profiles Functionality verified: > > Using splaypr.exe on Linux and Windows platforms > > helix-client-all-defines.pf > > > > Project: > > HEAD, 150Cay > > > > cvs diff : > > cvs diff: Diffing . > > Index: httpfsys.cpp > > =================================================================== > > RCS file: /cvsroot/filesystem/http/httpfsys.cpp,v > > retrieving revision 1.72.2.12 > > diff -u -w -r1.72.2.12 httpfsys.cpp > > --- httpfsys.cpp 9 Aug 2005 18:56:46 -0000 1.72.2.12 > > +++ httpfsys.cpp 12 Aug 2005 02:39:15 -0000 > > @@ -3872,7 +3872,7 @@ > > else > > { > > // Failed connection > > - m_LastError = HXR_INVALID_HOST; > > + m_LastError = status; > > if (m_bOnServer) > > { > > ReportConnectionFailure(); > > > > ? vc60.idb > > Index: platform/posix/sockimp.cpp > > =================================================================== > > RCS file: /cvsroot/common/netio/platform/posix/sockimp.cpp,v > > retrieving revision 1.74.2.4 > > diff -u -w -r1.74.2.4 sockimp.cpp > > --- platform/posix/sockimp.cpp 10 Jun 2005 23:25:09 > > -0000 1.74.2.4 > > +++ platform/posix/sockimp.cpp 12 Aug 2005 02:38:04 -0000 > > @@ -106,7 +106,7 @@ > > > > m_pOldResponse = m_pSock->GetResponse(); > > m_pSock->SetResponse(this); > > - AttemptConnect(); > > + AttemptConnect(HXR_OK); > > return HXR_OK; > > } > > > > @@ -179,20 +179,20 @@ > > } > > else > > { > > - AttemptConnect(); > > + AttemptConnect(status); > > } > > > > return HXR_OK; > > } > > > > void > > -CHXSocketConnectEnumerator::AttemptConnect(void) > > +CHXSocketConnectEnumerator::AttemptConnect(HX_RESULT status) > > { > > for (;;) > > { > > if (m_nIndex >= m_nVecLen) > > { > > - FinishEnumeration(HXR_FAIL); > > + FinishEnumeration(status); > > break; > > } > > > > Index: pub/platform/posix/sockimp.h > > =================================================================== > > RCS file: /cvsroot/common/netio/pub/platform/posix/sockimp.h,v > > retrieving revision 1.32.2.2 > > diff -u -w -r1.32.2.2 sockimp.h > > --- pub/platform/posix/sockimp.h 10 Aug 2005 21:15:05 > > -0000 1.32.2.2 > > +++ pub/platform/posix/sockimp.h 12 Aug 2005 02:38:04 -0000 > > @@ -84,7 +84,7 @@ > > STDMETHOD(EventPending) (THIS_ UINT32 uEvent, > > HX_RESULT status); > > > > private: > > - void AttemptConnect(void); > > + void AttemptConnect(HX_RESULT status); > > void FinishEnumeration(HX_RESULT status); > > > > protected: > > > > > > > > _______________________________________________ > > Common-dev mailing list > > Common-dev at helixcommunity.org > > http://lists.helixcommunity.org/mailman/listinfo/common-dev > >