Re: [Quickfix-users] A small bug ?
Brought to you by:
orenmnero
From: <OM...@th...> - 2003-03-15 19:50:38
|
Yup. I wrote a test test case to expose this which looks like this. // start time is greater than end time start = UtcTimeOnly( 18, 0, 0 ); end = UtcTimeOnly( 3, 0, 0 ); ... // time 1 is 25 hours greater than time 2 time1 = UtcTimeStamp( 21, 0, 0, 11, 10, 2000 ); time2 = UtcTimeStamp( 20, 0, 0, 10, 10, 2000 ); assert( !Session::isSameSession( start, end, time1, time2 ) ); The old code failed this test while your submission passed. The change has been checked in, thanks. I'm not sure about your point concerning the call to connect. The connect method gets called frequently (everytime the reconect interval expires). Are you saying that you want a report each time this method gets called for every session that is not active? Do you consider it an error condition when it decides not to attempt connection because it is outside the session parameters? --oren "Stancescu Constantin" <Con...@sw...> To: <qui...@li...> Sent by: cc: qui...@li...ur Subject: [Quickfix-users] A small bug ? ceforge.net 03/15/2003 07:58 AM I think there is a small bug in Session::isSameSession. If IsSessionTime() && start >= end the function returns true even if abs( time1Date - time2Date ) == 1and time1Date - time2Date > UTC_DAY which I think is not what you expect. I changed the code to bool Session::isSameSession( const UtcTimeOnly& start, const UtcTimeOnly& end, const UtcTimeStamp& time1, const UtcTimeStamp& time2 ) { if ( !isSessionTime( start, end, time1 ) ) return false; if ( !isSessionTime( start, end, time2 ) ) return false; return (time1 - time2 <= UTC_DAY) ; } And something not very nice from the admin point of view. Initiator::connect() calls Session::checkSessionTime and if the return value is false(this is in fact an error situation) there is no attempt to connect and no error reporting; it will be nice to be informed about such a situation, i.e. some admin message.... Regards, Constantin This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Quickfix-users mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-users |