[Quickfix-developers] BUG in Session.cpp. Messages not being resent.
Brought to you by:
orenmnero
From: Vitor C. <vc...@hi...> - 2003-06-18 09:44:10
|
Hi Oren, I found what I think is a bug introduced during the last optimization done on Session.cpp regarding the use of the toString() methods: In Session::sendRaw has the following code: 432 if ( isLoggedOn() ) result = 433 send( message.toString(messageString) ); ... ... 441 m_state.set( msgSeqNum, messageString ); In which messageString is being changed by the toString method as a side effect. The problem is that it is only changed if the session is logged on and is being used in line 441 to store the message in the messageStore. The effect of this is that if some message is generated while the other party is disconnected, the message doesn't get stored and consequently it will not be resent upon reconnection of the other party. I suggest the following change: Lines 432, 433 should be: 432 messageString = message.toString(); 433 if ( isLoggedOn() ) result = 434 send( messageString ); Best regards, and once again thank you for this excellent piece of code Vitor Castro |