RE: [Quickfix-developers] crashing on invalid messages (was: invalid message)
Brought to you by:
orenmnero
From: James C. D. <jc...@co...> - 2004-02-18 14:12:35
|
I'll create it if some one describes it.=20 Jim =20 James C. Downs Connamara Systems, LLC 53 W. Jackson Blvd Suite 1627 Chicago, IL 60604 312 - 282 - 7746 www.connamara.com -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of Miller, Oren Sent: Wednesday, February 18, 2004 5:48 AM To: st...@st...; qui...@li... Subject: Re: [Quickfix-developers] crashing on invalid messages (was: invalid message) That's why we have the automated tests. I could never validate code = with the same watchful eye that they do :) I also think a test for the new functionality would be warranted. -------------------------- Sent from my BlackBerry Wireless Handheld -----Original Message----- From: H. Steuer <st...@st...> To: qui...@li... <qui...@li...> Sent: Wed Feb 18 05:39:25 2004 Subject: [Quickfix-developers] crashing on invalid messages (was: = invalid message) hello, regarding my post to the list from 04/01/26 i've just added a catch = block which saves the application from crashing on invalid messages to SocketConnection::read( SocketConnector& s ).=20 using this patch, the application passed tests on invalid headers, = invalid checksums, missing checksums and invalid bodylength which all caused the application to crash before. hope oren will correct me, if that patch is not fine that way. regards, heri --- quickfix/src/C++/SocketConnection.cpp 2003-08-04 08:14:03.000000000 +0200 +++ SocketConnection.cpp 2004-02-18 11:46:38.000000000 +0100 @@ -97,7 +97,10 @@ std::string msg; if ( !readMessage( msg ) ) return false; =20 - m_pSession->next( msg ); + try { + m_pSession->next( msg ); + } + catch ( InvalidMessage& ) {} return true; =20 QF_STACK_POP ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software = kit from IBM. Click Now! http://ads.osdn.com/?ad_id=3D1356&alloc_id=3D3438&op=3Dclick _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software = kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id438&op=3Dick _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |