[Quickfix-developers] bug in seqnum storing file
Brought to you by:
orenmnero
From: Alexey Z. <ale...@in...> - 2005-01-25 17:58:45
|
Hello, =20 There is a pretty interesting bug (my system is Win2k, VC6). FileStore::setSeqNum() doesn=92t save target sequence number correctly = =96 If the number was big and you reset it during run, fprintf overrides not all numbers: =20 For example (the number is 301599): 87 : 301599 After reset (the number is 1 -> it writes =931 : 1=94): 1 : 101599 =20 When I restart my application QF expect the seqnum 101599, not 1. =20 I think you have to change format =96 add a space: =20 void FileStore::setSeqNum() { QF_STACK_PUSH(FileStore::setSeqNum) =20 rewind( m_seqNumsFile ); // old fprintf( m_seqNumsFile, "%d : %d", fprintf( m_seqNumsFile, "%d : %d ", getNextSenderMsgSeqNum(), getNextTargetMsgSeqNum() ); if ( ferror( m_seqNumsFile ) ) throw IOException(); if ( fflush( m_seqNumsFile ) ) throw IOException(); =20 QF_STACK_POP } =20 =20 =20 Regards, Alexey. |