[Quickfix-users] A small bug ?
Brought to you by:
orenmnero
From: Stancescu C. <Con...@sw...> - 2003-03-15 13:58:08
|
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. |