Re: [Quickfix-users] RejectLogon
Brought to you by:
orenmnero
From: Oren M. <or...@qu...> - 2005-04-30 06:20:40
|
Yeah, this looks like a good idea. I'll look at incorporating it into CVS. --oren On Apr 29, 2005, at 2:25 PM, Brian Erst wrote: > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ: > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html > > Oren - > > What is the purpose of the "what" string in RejectLogon? I had hoped > that this would be used to send a logout message with a Text field > indicating the reason for the logon rejection - in this way, I could > indicate to my clients that there was a bad username or such, but the > "what" field is actually ignored by the Session::next() exception > handler. > > I think it might be really useful to be able to generate a logout > message with a Text field when the "what" field of the RejectLogon is > not empty. The following patch would supply this functionality: > > Session.cpp > > -01181 catch ( RejectLogon& ) > +01181 catch ( RejectLogon& e) > 01182 { > 01183 m_state.onEvent( "Logon rejected" ); > + if (!e.what().empty()) > + generateLogout(e.what()); > 01184 disconnect(); > 01185 } > > This way, users that did not want to generate logouts could simply > leave out a reason ("what"), while users that wanted to add a logout > just need to set a non-blank reason. > > // No logout > throw FIX::RejectLogon(); > > // Logout with reason > throw FIX::RejectLogon("Bad username or password."); > > What do you think? I attempted to work around the problem by calling > generateLogout() prior to throwing the exception, but generateLogout() > is a private method and I don't really want to modify the QuickFIX > code; it makes upgrading a pain. > > - Brian Erst > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great > events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > |