Re: [Quickfix-developers] Session Qualifiers
Brought to you by:
orenmnero
From: John L. <joh...@sq...> - 2004-11-03 20:53:48
|
I've looked at this in QF1.9.2 but sendtotarget just adds the session id to the message before passing it to the standard SendToTarget, this always fails because of the qualifiers (unless there is another SendToTarget?) bool Session::sendToTarget( Message& message, const SessionID& sessionID )throw( SessionNotFound ){ QF_STACK_PUSH(Session::sendToTarget) message.setSessionID( sessionID ); return sendToTarget( message ); QF_STACK_POP}i would have thought that this should be the other way around. ie the standard SendToTarget extracts the session information and passes that to expanded version, eg: bool Session::sendToTarget( Message& message )throw( SessionNotFound ){ QF_STACK_PUSH(Session::sendToTarget) try { SessionID sessionID = message.getSessionID(); return sendToTarget( message, sessionID ); } catch ( FieldNotFound& ) { throw SessionNotFound(); } QF_STACK_POP}bool Session::sendToTarget( Message& message, const SessionID& sessionID )throw( SessionNotFound ){ QF_STACK_PUSH(Session::sendToTarget) message.setSessionID( sessionID ); Session* pSession = lookupSession( sessionID ); if ( !pSession ) throw SessionNotFound(); return result = pSession->send( message ); QF_STACK_POP}before i changed my code i wanted to make sure that nothing else would be broken when using qualifiers. ----- Original Message ----- From: "Oren Miller" <or...@qu...> To: "John Lister" <joh...@sq...> Cc: <qui...@li...> Sent: Wednesday, November 03, 2004 7:30 PM Subject: Re: [Quickfix-developers] Session Qualifiers Depends on which sendToTarget you use. Right now you need to use the method signature that takes in a SessionID as opposed to the ones that take in CompIDs or strings. --oren On Nov 3, 2004, at 12:22 PM, John Lister wrote: > Hi, i've been trying to use session qualifiers but have encountered a > problem. Although the session are set up correctly you cannot send a > message because senttotarget looks up a session without the qualifier > and fails. Has anyone else encountered this? > > Thanks |