Thread: RE: [Quickfix-developers] SocketConnection session registration BUG
Brought to you by:
orenmnero
|
From: Sean K. <Sea...@Pi...> - 2005-06-27 22:24:12
|
Thanks! > -----Original Message----- > From: Oren Miller [mailto:or...@qu...] > Sent: Monday, June 27, 2005 6:16 PM > To: Sean Kirkpatrick; qui...@li... > Subject: Re: [Quickfix-developers] SocketConnection session=20 > registration > BUG >=20 >=20 > Sean, I'll try to design a test that duplicates this scenario. >=20 > --oren >=20 > ----- Original Message -----=20 > From: "Sean Kirkpatrick" <Sea...@Pi...> > To: <qui...@li...> > Sent: Monday, June 27, 2005 10:34 AM > Subject: [Quickfix-developers] SocketConnection session=20 > registration BUG >=20 >=20 > QuickFIX Documentation:=20 > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX FAQ:=20 > http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ > QuickFIX Support: http://www.quickfixengine.org/services.html >=20 > I have added proprietary logging to the quickfix library to help debug > an issue we have been having with a client not being able to log in. > We could see the logon message coming across via tethereal, but were > unable to determine the reason why the socket was being dropped. >=20 > The following logs expose where the logic error in quickfix occurs: >=20 > 09:00:20.452 {QF::SocketMonitor::block} Socket [393] has data > 09:00:20.452 {QF::ServerWrapper::onEvent} data found on socket [393] > 09:00:20.452 {QF::SocketAcceptor::onData} getting=20 > SocketConnection [393] > 09:00:20.452 {QF::SocketAcceptor::onData} found SocketConnection [393] > 09:00:20.452 {QF::SocketConnection::read} reading message > 09:00:20.452 {QF::Parser::readFromStream} socket_fionread=20 > returned [72]=20 > bytes > 09:00:20.452 {QF::Parser::readFromStream} recv [72] bytes on=20 > socket [393] > 09:00:20.452 {QF::Parser::readFixMessage} found BeginString tag 8 > 09:00:20.452 {QF::Parser::readFixMessage} found CheckSum tag 10 > 09:00:20.452 {QF::Parser::readFixMessage} found final SOH char > 09:00:20.452 {QF::Parser::readFixMessage} message=20 > [8=3DFIX.4.0^A9=3D50^A35=3D0^A49=3DSEND^A56=3DRECV > ^A34=3D1^A52=3D20050627-13:00:20^A10=3D056^A] > 09:00:20.452 {QF::SocketConnection::read} looking for session=20 > based on=20 > [8=3DFIX.4.0^A9=3D50^A35=3D0 > ^A49=3DSEND^A56=3DRECV^A34=3D1^A52=3D20050627-13:00:20^A10=3D056^A] > 09:00:20.452 {QF::Session::lookupSession} Looking for session:=20 > [FIX.4.0:RECV->SEND] > 09:00:20.452 {QF::Session::lookupSession} FOUND IT! > 09:00:20.452 {QF::SocketConnection::read} registering session=20 > [FIX.4.0:RECV->SEND] > 09:00:20.453 {QF::Session::lookupSession} Looking for session:=20 > [FIX.4.0:RECV->SEND] > 09:00:20.453 {QF::Session::lookupSession} FOUND IT! > 09:00:20.453 {QF::Session::registerSession} found session=20 > [FIX.4.0:RECV->SEND] > 09:00:20.453 {QF::Session::registerSession} registering session > ---- > 09:00:20.453 {QF::SocketConnection::read} getting=20 > SocketAcceptor session=20 > [8=3DFIX.4.0^A9=3D50^A35 > = =3D0^A49=3DSEND^A56=3DRECV^A34=3D1^A52=3D20050627-13:00:20^A10=3D056^A] > 09:00:20.453 {QF::Acceptor::getSession} msgType [0] not valid > 09:00:20.453 {QF::SocketConnection::read} Dropping socket connection > 09:00:20.453 {QF::SocketConnection::read} reading message > 09:00:20.453 {QF::Parser::readFromStream} socket_fionread failed > 09:00:20.453 {QF::SocketMonitor::block} queue has sockets to drop > 09:00:20.453 {QF::SocketAcceptor::onDisconnect} Disconnecting=20 > socket: [393] > 09:00:20.453 {QF::SocketConnection::~SocketConnection} destroying=20 > SocketConnection >=20 > The problem occurs between the "----" separated log lines. =20 > The library > registers the session, but then attempts to validate that the=20 > recvd message > is a logon. If it is not, the function return NULL as the m_pSession > variable. The next section of the SocketConnection read=20 > checks for a valid > m_pSession. If the session is NULL, the socket is dropped. When the > SocketConnection is destroyed, it's m_pSession is still NULL,=20 > and the object > is never unregistered. Subsequent attempts to connect to=20 > this session log > the following: >=20 > 09:04:26.744 {QF::SocketMonitor::block} Socket [393] has data > 09:04:26.744 {QF::ServerWrapper::onEvent} data found on socket [393] > 09:04:26.744 {QF::SocketAcceptor::onData} getting=20 > SocketConnection [393] > 09:04:26.744 {QF::SocketAcceptor::onData} found SocketConnection [393] > 09:04:26.744 {QF::SocketConnection::read} reading message > 09:04:26.744 {QF::Parser::readFromStream} socket_fionread=20 > returned [84]=20 > bytes > 09:04:26.744 {QF::Parser::readFromStream} recv [84] bytes on=20 > socket [393] > 09:04:26.745 {QF::Parser::readFixMessage} found BeginString tag 8 > 09:04:26.745 {QF::Parser::readFixMessage} found CheckSum tag 10 > 09:04:26.745 {QF::Parser::readFixMessage} found final SOH char > 09:04:26.745 {QF::Parser::readFixMessage} message=20 > [8=3DFIX.4.0^A9=3D62^A35=3DA^A49=3DSEND^A56=3DRECV > ^A34=3D3^A52=3D20050627-13:04:26^A98=3D0^A108=3D20^A10=3D112^A] > 09:04:26.745 {QF::SocketConnection::read} looking for session=20 > based on=20 > [8=3DFIX.4.0^A9=3D62^A35=3DA > = ^A49=3DSEND^A56=3DRECV^A34=3D3^A52=3D20050627-13:04:26^A98=3D0^A108=3D20^= A > 10=3D112^A] > 09:04:26.745 {QF::Session::lookupSession} Looking for session:=20 > [FIX.4.0:RECV->SEND] > 09:04:26.745 {QF::Session::lookupSession} FOUND IT! > 09:04:26.745 {QF::SocketConnection::read} registering session=20 > [FIX.4.0:RECV->SEND] > 09:04:26.745 {QF::Session::lookupSession} Looking for session:=20 > [FIX.4.0:RECV->SEND] > 09:04:26.745 {QF::Session::lookupSession} FOUND IT! > 09:04:26.745 {QF::Session::registerSession} found session=20 > [FIX.4.0:RECV->SEND] > ---- > 09:04:26.745 {QF::SocketConnection::read} Dropping socket connection > 09:04:26.745 {QF::SocketConnection::read} reading message > 09:04:26.745 {QF::Parser::readFromStream} socket_fionread failed > 09:04:26.745 {QF::SocketMonitor::block} queue has sockets to drop > 09:04:26.745 {QF::SocketAcceptor::onDisconnect} Disconnecting=20 > socket: [393] > 09:04:26.745 {QF::SocketConnection::~SocketConnection} destroying=20 > SocketConnection >=20 > In between the "----" separated log lines, the session is detected as=20 > already > registered and the m_pSession member is again set to NULL and=20 > the socket is > dropped. >=20 > I believe that there is a very simple fix that will correct=20 > this issue. The > order of the following code in SocketConnection::read (the=20 > LOGDEBUG lines=20 > are > for the logging I added): >=20 > if ( m_pSession ) { > LOGDEBUG(funcname,"registering session=20 > [%s]",m_pSession->getSessionID().toString().c_str()); > m_pSession =3D Session::registerSession(=20 > m_pSession->getSessionID() ); > } >=20 > if ( m_pSession ) { > LOGDEBUG(funcname,"getting SocketAcceptor session=20 > [%s]",msg.c_str()); > m_pSession =3D a.getSession( msg, *this ); > } >=20 > needs to be reversed to be: >=20 > if ( m_pSession ) { > LOGDEBUG(funcname,"getting SocketAcceptor session=20 > [%s]",msg.c_str()); > m_pSession =3D a.getSession( msg, *this ); > } >=20 > if ( m_pSession ) { > LOGDEBUG(funcname,"registering session=20 > [%s]",m_pSession->getSessionID().toString().c_str()); > m_pSession =3D Session::registerSession(=20 > m_pSession->getSessionID() ); > } >=20 > If this is the case, any invalid initial messages will invalidate the > m_pSession member prior to attempting to register the=20 > session. Only valid > connections will be registered, and the disconnect logic works fine so > long as the registration is done properly. A week of=20 > development was lost > due to the lack of engine-level logging in the quickfix library, and I > know that this is an issue that has been raised several times=20 > in the past. >=20 > Please provide feedback. >=20 > --Sean >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers >=20 >=20 |
|
From: Sean K. <Sea...@Pi...> - 2005-06-28 13:52:50
|
Oren,
I will do as you have suggested. I appreciate you taking the time
to look into this. I will make the change below and test it out.
I'd like to offer my services to get some engine-level logging into
the next release of quickfix. It's a great product and this would
help cover any remaining unknowns about messaging prior to establishing
a logon. I'd be more than happy to follow any coding practices you
have so that the logging will integrate seamlessly. Please let me know
if you are interested in this.
Thanks again.
Sean
> -----Original Message-----
> From: Oren Miller [mailto:or...@qu...]
> Sent: Tuesday, June 28, 2005 9:27 AM
> To: Sean Kirkpatrick; qui...@li...
> Subject: Re: [Quickfix-developers] SocketConnection session=20
> registration
> BUG
>=20
>=20
> Sean,
>=20
> When applying your patch, other acceptance tests break. In=20
> fact it results=20
> in a crash during a typical multiple logon scenario. (If you=20
> run your=20
> acceptance tests, it should reveal the same thing to you). =20
> I've included=20
> another implementation of SocketConnection::read which passes all the=20
> acceptance tests and should also fix the bug you've reported.=20
> Please report=20
> back if that is the case:
>=20
> bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
> { QF_STACK_PUSH(SocketConnection::read)
>=20
> std::string msg;
> try
> {
> readFromSocket();
>=20
> if ( !m_pSession )
> {
> if ( !readMessage( msg ) ) return false;
> m_pSession =3D Session::lookupSession( msg, true );
> if( m_pSession &&=20
> Session::isSessionRegistered(m_pSession->getSessionID()) )
> m_pSession =3D 0;
> if( m_pSession )
> m_pSession =3D a.getSession( msg, *this );
> if( m_pSession )
> m_pSession->next( msg );
> if( !m_pSession )
> {
> s.getMonitor().drop( m_socket );
> return false;
> }
>=20
> Session::registerSession( m_pSession->getSessionID() );
> }
>=20
> readMessages( s.getMonitor() );
> return true;
> }
> catch ( SocketRecvFailed& e )
> {
> if( m_pSession )
> m_pSession->getLog()->onEvent( e.what() );
> s.getMonitor().drop( m_socket );
> }
> catch ( InvalidMessage& )
> {
> s.getMonitor().drop( m_socket );
> }
> return false;
>=20
> QF_STACK_POP
> }
> ----- Original Message -----=20
> From: "Sean Kirkpatrick" <Sea...@Pi...>
> To: <qui...@li...>
> Sent: Monday, June 27, 2005 10:34 AM
> Subject: [Quickfix-developers] SocketConnection session=20
> registration BUG
>=20
>=20
> QuickFIX Documentation:=20
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX FAQ:=20
http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html
I believe that there is a very simple fix that will correct this issue. =
The
order of the following code in SocketConnection::read (the LOGDEBUG =
lines=20
are
for the logging I added):
if ( m_pSession ) {
LOGDEBUG(funcname,"registering session=20
[%s]",m_pSession->getSessionID().toString().c_str());
m_pSession =3D Session::registerSession( m_pSession->getSessionID() =
);
}
if ( m_pSession ) {
LOGDEBUG(funcname,"getting SocketAcceptor session =
[%s]",msg.c_str());
m_pSession =3D a.getSession( msg, *this );
}
needs to be reversed to be:
if ( m_pSession ) {
LOGDEBUG(funcname,"getting SocketAcceptor session =
[%s]",msg.c_str());
m_pSession =3D a.getSession( msg, *this );
}
if ( m_pSession ) {
LOGDEBUG(funcname,"registering session=20
[%s]",m_pSession->getSessionID().toString().c_str());
m_pSession =3D Session::registerSession( m_pSession->getSessionID() =
);
}
|
|
From: Joerg T. <Joe...@ma...> - 2005-06-28 20:01:50
|
Sean Kirkpatrick wrote:
> I'd like to offer my services to get some engine-level logging into
> the next release of quickfix. It's a great product and this would
> help cover any remaining unknowns about messaging prior to establishing
> a logon. I'd be more than happy to follow any coding practices you
> have so that the logging will integrate seamlessly. Please let me know
> if you are interested in this.
Sean, I would suggest to use some Log4J-style logging library, e.g. log4cplus on
sourceforge. Your engine level logging would be at DEBUG or TRACE level.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|
|
From: Sean K. <Sea...@Pi...> - 2005-06-28 16:48:54
|
I was putting this code in, but there is neither readFromSocket() nor
readMessages() in the SocketConnection object/base in 1.9.4. Is this
the version in CVS? I would prefer to patch the released source,
if possible. The function taken directly from 1.9.4 is as follows:
bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
{ QF_STACK_PUSH(SocketConnection::read)
std::string msg;
try
{
if ( !readMessage( msg ) ) return false;
if ( !m_pSession )
{
m_pSession =3D Session::lookupSession( msg, true );
if ( m_pSession )
m_pSession =3D Session::registerSession( =
m_pSession->getSessionID() );
if ( m_pSession )
m_pSession =3D a.getSession( msg, *this );
}
if ( m_pSession )
m_pSession->next( msg );
else
s.getMonitor().drop( m_socket );
return true;
}
catch ( RecvFailed& )
{
s.getMonitor().drop( m_socket );
}
catch ( InvalidMessage& )
{
if ( !m_pSession->isLoggedOn() )
s.getMonitor().drop( m_socket );
}
return true;
QF_STACK_POP
}
Will modifying the code to be the following (with the extra
isSessionRegistered check) be a sufficient fix? Or is it
necessary to pull the call to readMessage and Session::next
into the if (!m_pSession) block?=20
bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
{ QF_STACK_PUSH(SocketConnection::read)
std::string msg;
try
{
if ( !readMessage( msg ) ) return false;
if ( !m_pSession )
{
m_pSession =3D Session::lookupSession( msg, true );
if ( m_pSession &&
Session::isSessionRegistered(m_pSession->getSessionID()) )
m_pSession =3D 0;
if ( m_pSession )
m_pSession =3D a.getSession( msg, *this );
if ( m_pSession )
m_pSession =3D Session::registerSession( =
m_pSession->getSessionID() );
}
if ( m_pSession )
m_pSession->next( msg );
else
s.getMonitor().drop( m_socket );
return true;
}
catch ( RecvFailed& )
{
s.getMonitor().drop( m_socket );
}
catch ( InvalidMessage& )
{
if ( !m_pSession->isLoggedOn() )
s.getMonitor().drop( m_socket );
}
return true;
QF_STACK_POP
}
--Sean
> -----Original Message-----
> From: Oren Miller [mailto:or...@qu...]
> Sent: Tuesday, June 28, 2005 9:27 AM
> To: Sean Kirkpatrick; qui...@li...
> Subject: Re: [Quickfix-developers] SocketConnection session=20
> registration
> BUG
>=20
>=20
> Sean,
>=20
> When applying your patch, other acceptance tests break. In=20
> fact it results=20
> in a crash during a typical multiple logon scenario. (If you=20
> run your=20
> acceptance tests, it should reveal the same thing to you). =20
> I've included=20
> another implementation of SocketConnection::read which passes all the=20
> acceptance tests and should also fix the bug you've reported.=20
> Please report=20
> back if that is the case:
>=20
> bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
> { QF_STACK_PUSH(SocketConnection::read)
>=20
> std::string msg;
> try
> {
> readFromSocket();
>=20
> if ( !m_pSession )
> {
> if ( !readMessage( msg ) ) return false;
> m_pSession =3D Session::lookupSession( msg, true );
> if( m_pSession &&=20
> Session::isSessionRegistered(m_pSession->getSessionID()) )
> m_pSession =3D 0;
> if( m_pSession )
> m_pSession =3D a.getSession( msg, *this );
> if( m_pSession )
> m_pSession->next( msg );
> if( !m_pSession )
> {
> s.getMonitor().drop( m_socket );
> return false;
> }
>=20
> Session::registerSession( m_pSession->getSessionID() );
> }
>=20
> readMessages( s.getMonitor() );
> return true;
> }
> catch ( SocketRecvFailed& e )
> {
> if( m_pSession )
> m_pSession->getLog()->onEvent( e.what() );
> s.getMonitor().drop( m_socket );
> }
> catch ( InvalidMessage& )
> {
> s.getMonitor().drop( m_socket );
> }
> return false;
>=20
> QF_STACK_POP
> }
> ----- Original Message -----=20
> From: "Sean Kirkpatrick" <Sea...@Pi...>
> To: <qui...@li...>
> Sent: Monday, June 27, 2005 10:34 AM
> Subject: [Quickfix-developers] SocketConnection session=20
> registration BUG
>=20
>=20
> QuickFIX Documentation:=20
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX FAQ:=20
http://www.quickfixengine.org/wikifix/index.php?QuickFixFAQ
QuickFIX Support: http://www.quickfixengine.org/services.html
I believe that there is a very simple fix that will correct this issue. =
The
order of the following code in SocketConnection::read (the LOGDEBUG =
lines=20
are
for the logging I added):
if ( m_pSession ) {
LOGDEBUG(funcname,"registering session=20
[%s]",m_pSession->getSessionID().toString().c_str());
m_pSession =3D Session::registerSession( m_pSession->getSessionID() =
);
}
if ( m_pSession ) {
LOGDEBUG(funcname,"getting SocketAcceptor session =
[%s]",msg.c_str());
m_pSession =3D a.getSession( msg, *this );
}
needs to be reversed to be:
if ( m_pSession ) {
LOGDEBUG(funcname,"getting SocketAcceptor session =
[%s]",msg.c_str());
m_pSession =3D a.getSession( msg, *this );
}
if ( m_pSession ) {
LOGDEBUG(funcname,"registering session=20
[%s]",m_pSession->getSessionID().toString().c_str());
m_pSession =3D Session::registerSession( m_pSession->getSessionID() =
);
}
|
|
From: Oren M. <or...@qu...> - 2005-06-28 20:08:01
|
Yeah, I think that will do although clearly I have not tested that
exact code block. The point of the patch is that the session will
only get registered when all other tests have succeeded. Just make
sure that in addition to fixing your problem, you are also still
passing all the unit/acceptance tests.
--oren
On Jun 28, 2005, at 11:48 AM, Sean Kirkpatrick wrote:
> I was putting this code in, but there is neither readFromSocket() nor
> readMessages() in the SocketConnection object/base in 1.9.4. Is this
> the version in CVS? I would prefer to patch the released source,
> if possible. The function taken directly from 1.9.4 is as follows:
>
> bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
> { QF_STACK_PUSH(SocketConnection::read)
>
> std::string msg;
> try
> {
> if ( !readMessage( msg ) ) return false;
>
> if ( !m_pSession )
> {
> m_pSession = Session::lookupSession( msg, true );
> if ( m_pSession )
> m_pSession = Session::registerSession( m_pSession-
> >getSessionID() );
> if ( m_pSession )
> m_pSession = a.getSession( msg, *this );
> }
>
> if ( m_pSession )
> m_pSession->next( msg );
> else
> s.getMonitor().drop( m_socket );
> return true;
> }
> catch ( RecvFailed& )
> {
> s.getMonitor().drop( m_socket );
> }
> catch ( InvalidMessage& )
> {
> if ( !m_pSession->isLoggedOn() )
> s.getMonitor().drop( m_socket );
> }
> return true;
>
> QF_STACK_POP
> }
>
> Will modifying the code to be the following (with the extra
> isSessionRegistered check) be a sufficient fix? Or is it
> necessary to pull the call to readMessage and Session::next
> into the if (!m_pSession) block?
>
> bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
> { QF_STACK_PUSH(SocketConnection::read)
>
> std::string msg;
> try
> {
> if ( !readMessage( msg ) ) return false;
>
> if ( !m_pSession )
> {
> m_pSession = Session::lookupSession( msg, true );
> if ( m_pSession &&
> Session::isSessionRegistered(m_pSession->getSessionID()) )
> m_pSession = 0;
> if ( m_pSession )
> m_pSession = a.getSession( msg, *this );
> if ( m_pSession )
> m_pSession = Session::registerSession( m_pSession-
> >getSessionID() );
> }
>
> if ( m_pSession )
> m_pSession->next( msg );
> else
> s.getMonitor().drop( m_socket );
> return true;
> }
> catch ( RecvFailed& )
> {
> s.getMonitor().drop( m_socket );
> }
> catch ( InvalidMessage& )
> {
> if ( !m_pSession->isLoggedOn() )
> s.getMonitor().drop( m_socket );
> }
> return true;
>
> QF_STACK_POP
> }
>
> --Sean
>
>
>> -----Original Message-----
>> From: Oren Miller [mailto:or...@qu...]
>> Sent: Tuesday, June 28, 2005 9:27 AM
>> To: Sean Kirkpatrick; qui...@li...
>> Subject: Re: [Quickfix-developers] SocketConnection session
>> registration
>> BUG
>>
>>
>> Sean,
>>
>> When applying your patch, other acceptance tests break. In
>> fact it results
>> in a crash during a typical multiple logon scenario. (If you
>> run your
>> acceptance tests, it should reveal the same thing to you).
>> I've included
>> another implementation of SocketConnection::read which passes all the
>> acceptance tests and should also fix the bug you've reported.
>> Please report
>> back if that is the case:
>>
>> bool SocketConnection::read( SocketAcceptor& a, SocketServer& s )
>> { QF_STACK_PUSH(SocketConnection::read)
>>
>> std::string msg;
>> try
>> {
>> readFromSocket();
>>
>> if ( !m_pSession )
>> {
>> if ( !readMessage( msg ) ) return false;
>> m_pSession = Session::lookupSession( msg, true );
>> if( m_pSession &&
>> Session::isSessionRegistered(m_pSession->getSessionID()) )
>> m_pSession = 0;
>> if( m_pSession )
>> m_pSession = a.getSession( msg, *this );
>> if( m_pSession )
>> m_pSession->next( msg );
>> if( !m_pSession )
>> {
>> s.getMonitor().drop( m_socket );
>> return false;
>> }
>>
>> Session::registerSession( m_pSession->getSessionID() );
>> }
>>
>> readMessages( s.getMonitor() );
>> return true;
>> }
>> catch ( SocketRecvFailed& e )
>> {
>> if( m_pSession )
>> m_pSession->getLog()->onEvent( e.what() );
>> s.getMonitor().drop( m_socket );
>> }
>> catch ( InvalidMessage& )
>> {
>> s.getMonitor().drop( m_socket );
>> }
>> return false;
>>
>> QF_STACK_POP
>> }
>> ----- Original Message -----
>> From: "Sean Kirkpatrick" <Sea...@Pi...>
>> To: <qui...@li...>
>> Sent: Monday, June 27, 2005 10:34 AM
>> Subject: [Quickfix-developers] SocketConnection session
>> registration BUG
>>
>>
>> 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
>
> I believe that there is a very simple fix that will correct this
> issue. The
> order of the following code in SocketConnection::read (the LOGDEBUG
> lines
> are
> for the logging I added):
>
> if ( m_pSession ) {
> LOGDEBUG(funcname,"registering session
> [%s]",m_pSession->getSessionID().toString().c_str());
> m_pSession = Session::registerSession( m_pSession->getSessionID
> () );
> }
>
> if ( m_pSession ) {
> LOGDEBUG(funcname,"getting SocketAcceptor session [%
> s]",msg.c_str());
> m_pSession = a.getSession( msg, *this );
> }
>
> needs to be reversed to be:
>
> if ( m_pSession ) {
> LOGDEBUG(funcname,"getting SocketAcceptor session [%
> s]",msg.c_str());
> m_pSession = a.getSession( msg, *this );
> }
>
> if ( m_pSession ) {
> LOGDEBUG(funcname,"registering session
> [%s]",m_pSession->getSessionID().toString().c_str());
> m_pSession = Session::registerSession( m_pSession->getSessionID
> () );
> }
>
>
>
>
|
|
From: Sean K. <Sea...@Pi...> - 2005-06-28 20:19:15
|
I'll have to take a look at the logging you mentioned. It would definitely be an additional debugging property that would only write logs if explicitly specified by the end-user. So would this DEBUG/TRACE level logging be a welcome addition? --Sean > -----Original Message----- > From: Joerg Thoennes [mailto:Joe...@ma...] > Sent: Tuesday, June 28, 2005 4:02 PM > To: Sean Kirkpatrick > Cc: Oren Miller; qui...@li... > Subject: Re: [Quickfix-developers] SocketConnection session=20 > registration > BUG >=20 >=20 > Sean Kirkpatrick wrote: > > I'd like to offer my services to get some engine-level logging into > > the next release of quickfix. It's a great product and this would > > help cover any remaining unknowns about messaging prior to=20 > establishing > > a logon. I'd be more than happy to follow any coding practices you > > have so that the logging will integrate seamlessly. Please=20 > let me know > > if you are interested in this. >=20 > Sean, I would suggest to use some Log4J-style logging=20 > library, e.g. log4cplus on=20 > sourceforge. Your engine level logging would be at DEBUG or=20 > TRACE level. >=20 > Cheers, J=F6rg >=20 > --=20 > Joerg Thoennes > http://macd.com > Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH > Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen >=20 |