Re: [Quickfix-developers] Already sent ResendRequest ... Not sending another.
Brought to you by:
orenmnero
|
From: Caleb E. <cal...@gm...> - 2006-01-09 16:40:57
|
On 1/9/06, Scott Harrington <sco...@fo...> wrote:
>
> Thanks for patching the Session.cpp code to fix my problem. I just today
> caught up to things and have ported your fix to my local copy of
> quickfixj/src/quickfix/Session.java. The patch is attached; could we ask
> Steve to review it and check it in to quickfixj?
This looks like half of the fix, but you're missing the logic to reset the
SessionState's resendRange back to (0,0) in Session::verify. Here's the
relevant section of the patch, which includes another fix Oren recently mad=
e
for handling Logon messages containing ResetSeqNumFlag=3DY
--- Session.cpp 2 Jan 2006 21:26:37 -0000 1.85
+++ Session.cpp 9 Jan 2006 16:04:56 -0000 1.87
@@ -235,7 +235,7 @@
MsgSeqNum msgSeqNum;
logon.getHeader().getField( msgSeqNum );
- if ( isTargetTooHigh( msgSeqNum ) )
+ if ( isTargetTooHigh( msgSeqNum ) && !resetSeqNumFlag )
{
doTargetTooHigh( logon );
}
@@ -964,6 +964,20 @@
doTargetTooLow( msg );
return false;
}
+
+ if ( (checkTooHigh || checkTooLow) && m_state.resendRequested() )
+ {
+ SessionState::ResendRange range =3D m_state.resendRange();
+
+ if ( msgSeqNum >=3D range.second )
+ {
+ m_state.onEvent ("ResendRequest for messages FROM: " +
+ IntConvertor::convert (range.first) + " TO: " +
+ IntConvertor::convert (range.second) +
+ " has been satisfied.");
+ m_state.resendRange (0, 0);
+ }
+ }
}
catch ( std::exception& e )
{
--
Caleb Epstein
caleb dot epstein at gmail dot com
|