RE: [Quickfix-developers] BUG in Session.cpp. Messages not being resent.
Brought to you by:
orenmnero
From: Oren M. <ore...@ya...> - 2003-06-19 13:49:57
|
I thought so too at first, but then I realized that toString needs to be called after toAdmin or toApp in case the user modified the message in their callback. So I checked in something similar to what you originally suggested. --- Vitor Castro <vc...@hi...> wrote: > Yes that is of course much more intelligent. How can > that be checked in? > Will you do it? > > > > -----Original Message----- > From: > qui...@li... > [mailto:qui...@li...] > On Behalf Of > Oren Miller > Sent: quarta-feira, 18 de Junho de 2003 20:20 > To: Vitor Castro; 'Miller, Oren' > Cc: qui...@li... > Subject: Re: [Quickfix-developers] BUG in > Session.cpp. Messages not > being resent. > > > What do you think about instead pulling: > > messageString = message.toString(); > > up to line 413, and passing the messageString into > send on lines 425 and 433. > > --- Vitor Castro <vc...@hi...> wrote: > > 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 > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: INetU > > Attention Web Developers & Consultants: Become An > > INetU Hosting Partner. > > Refer Dedicated Servers. We Manage Them. You Get > 10% > > Monthly Commission! > > INetU Dedicated Managed Hosting > http://www.inetu.net/partner/index.php > > _______________________________________________ > > Quickfix-developers mailing list > > Qui...@li... > > > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > > ------------------------------------------------------- > This SF.Net email is sponsored by: INetU > Attention Web Developers & Consultants: Become An > INetU Hosting Partner. > Refer Dedicated Servers. We Manage Them. You Get 10% > Monthly Commission! > INetU Dedicated Managed Hosting > http://www.inetu.net/partner/index.php > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |