Thread: [Quickfix-developers] fromAdmin/fromApp not getting called on Logout from rejected logon
Brought to you by:
orenmnero
From: Jason F. <jf...@ty...> - 2005-01-06 15:46:43
|
Can someone please help me before the men in white coats come to take me away. I am currently developing an application that connects to CME's iLink and I am trying to run a test where the initial Login is rejected due to a deliberate incorrect password. CME responds back with a Logout message with the reason set, but mysteriously the onLogout callback is called but not the fromAdmin callback, this means that I can not set the next expect sequence number to the one sent by CME. Is this expected behaviour, am I missing something? Also what is the best way to perform a manual Logon/Logoff, the SocketInitiator/Session are doing this automatically at the moment and I would like to perform these myself. Thank you in advance. Jason Fagan |
From: Jason F. <jf...@ty...> - 2005-01-07 09:36:57
|
After some investigation it appears that a logic_error of "Logon state is not valid for message" is being thrown in response to the Logout message being sent from CME, thus resulting in the fromAdmin callback not being called. Is this expected behavior or a possible bug? Jason _____ From: qui...@li... [mailto:qui...@li...] On Behalf Of Jason Fagan Sent: 06 January 2005 15:47 To: qui...@li... Subject: [Quickfix-developers] fromAdmin/fromApp not getting called on Logout from rejected logon Can someone please help me before the men in white coats come to take me away. I am currently developing an application that connects to CME's iLink and I am trying to run a test where the initial Login is rejected due to a deliberate incorrect password. CME responds back with a Logout message with the reason set, but mysteriously the onLogout callback is called but not the fromAdmin callback, this means that I can not set the next expect sequence number to the one sent by CME. Is this expected behaviour, am I missing something? Also what is the best way to perform a manual Logon/Logoff, the SocketInitiator/Session are doing this automatically at the moment and I would like to perform these myself. Thank you in advance. Jason Fagan |
From: Caleb E. <cal...@gm...> - 2005-01-07 13:26:12
|
On Fri, 7 Jan 2005 09:36:45 -0000, Jason Fagan <jf...@ty...> wrote: > After some investigation it appears that a logic_error of "Logon state is > not valid for message" is being thrown in response to the Logout message > being sent from CME, thus resulting in the fromAdmin callback not being > called. Is this expected behavior or a possible bug? Sounds like a bug in QuickFIX. According to the FIX 4.4 spec, in the Session Protocol section, page 6: "If authentication fails, the session acceptor should shut down the connection after *optionally sending a Logout message* to indicate the reason of failure" Emphasis mine. So it is possible to receive a Logout without having successfully logged in. I think there just needs to be a small change to Session::validLogonState to handle this case. Something like: if ( msgType == MsgType_Logout && m_state.sentLogon ()) return true; The Session::nextLogout code should probably NOT generate a Logout response in response to this message, however. -- Caleb Epstein caleb dot epstein at gmail dot com |
From: Jason F. <jf...@ty...> - 2005-01-07 14:39:50
|
> Sounds like a bug in QuickFIX. According to the FIX 4.4 spec, in the > Session Protocol section, page 6: > > "If authentication fails, the session acceptor should shut down the > connection after *optionally sending a Logout message* to indicate the > reason of failure" > > Emphasis mine. So it is possible to receive a Logout without having > successfully logged in. I think there just needs to be a small change > to Session::validLogonState to handle this case. Something like: > > if ( msgType == MsgType_Logout && m_state.sentLogon ()) > return true; > > The Session::nextLogout code should probably NOT generate a Logout > response in response to this message, however. Caleb, That's what I thought, I'll try your suggested change and see if that helps with my problem. Thanks for the tip. Jason |
From: Jason F. <jf...@ty...> - 2005-01-10 08:02:54
|
To update on this problem, trying the suggested fix by Caleb Epstein solved the problem with the Logout message being ignored. Will the suggested fix be in the next release? Caleb Epsteins' solution : > In Session::validLogonState > > if ( msgType == MsgType_Logout && m_state.sentLogon ()) > return true; > Thanks Jason Fagan |
From: Jason F. <jf...@ty...> - 2005-01-10 11:05:00
|
Hi Could someone please explain how the session can be controlled when acting as an initiator? I use the SocketInitiator, but this sends a Logon for you, the problem I have is that if I get a logout due to a bad logon the code starts sending a logon again even if I do a Session::disconnect in the fromAdmin callback. Any help with this would be gratefully received. Regards Jason Fagan |
From: Oren M. <or...@qu...> - 2005-01-10 17:51:55
|
Jason, Use logoff instead of disconnect, then use logon when you want the session to reastablish connection. --oren ----- Original Message ----- From: "Jason Fagan" <jf...@ty...> To: <qui...@li...> Sent: Monday, January 10, 2005 5:04 AM Subject: [Quickfix-developers] Require help with session control > 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 > > Hi > > Could someone please explain how the session can be controlled when acting > as an initiator? > > I use the SocketInitiator, but this sends a Logon for you, the problem I > have is that if I get a logout due to a bad logon the code starts sending > a > logon again even if I do a Session::disconnect in the fromAdmin callback. > > Any help with this would be gratefully received. > > Regards > > > Jason Fagan > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |
From: Oren M. <or...@qu...> - 2005-01-11 05:16:55
|
Yup. --oren ----- Original Message ----- From: "Jason Fagan" <jf...@ty...> To: <qui...@li...> Sent: Monday, January 10, 2005 2:02 AM Subject: [Quickfix-developers] RE: fromAdmin/fromApp not getting called on Logout from rejected logon > 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 > > To update on this problem, trying the suggested fix by Caleb Epstein > solved > the problem with the Logout message being ignored. > > Will the suggested fix be in the next release? > > Caleb Epsteins' solution : > >> In Session::validLogonState >> >> if ( msgType == MsgType_Logout && m_state.sentLogon ()) >> return true; >> > > Thanks > > Jason Fagan > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > |