RE: [Quickfix-users] A small bug ?
Brought to you by:
orenmnero
From: Stancescu C. <Con...@sw...> - 2003-03-17 07:51:12
|
What disturbs me is only the case where the connection is not established because=20 now - creationTime > UTC_DAY Note that in normal operation this should never happen, and that a program will never be able to get out of it !=20 In facta reset(), as for session creation, could be even better then an error message. The case where now is outside session time but=20 now - creationTime <=3D UTC_DAY is OK as it is.=20 -----Original Message----- From: OM...@th... [mailto:OM...@th...] Sent: Samstag, 15. M=E4rz 2003 20:50 To: Stancescu Constantin Cc: qui...@li...; qui...@li... Subject: Re: [Quickfix-users] A small bug ? Yup. I wrote a test test case to expose this which looks like this. // start time is greater than end time start =3D UtcTimeOnly( 18, 0, 0 ); end =3D UtcTimeOnly( 3, 0, 0 ); ... // time 1 is 25 hours greater than time 2 time1 =3D UtcTimeStamp( 21, 0, 0, 11, 10, 2000 ); time2 =3D 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 = = =20 "Stancescu Constantin" = = =20 <Con...@sw...> To: = <qui...@li...> = =20 Sent by: cc: = = =20 qui...@li...ur Subject: = [Quickfix-users] A small bug ? = =20 ceforge.net = = =20 = = =20 = = =20 03/15/2003 07:58 AM = = =20 = = =20 = = =20 I think there is a small bug in Session::isSameSession. If IsSessionTime() && start >=3D end the function returns true even if abs( time1Date - time2Date ) =3D=3D 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 <=3D 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 |