Thread: [Quickfix-developers] Session Qualifiers
Brought to you by:
orenmnero
From: John L. <joh...@sq...> - 2004-11-03 18:22:36
|
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 |
From: Oren M. <or...@qu...> - 2004-11-03 19:31:18
|
Depends on which sendToTarget you use. Right now you need to use the=20 method signature that takes in a SessionID as opposed to the ones that=20= 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=20= > problem. Although the session are set up correctly you cannot send a=20= > message because senttotarget looks up a session without the qualifier=20= > and fails. Has anyone else encountered this? > =A0 > Thanks |
From: John L. <joh...@sq...> - 2004-11-03 20:46:31
|
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 - see below ----- 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 |
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 |
From: Oren M. <or...@qu...> - 2004-11-03 21:14:16
|
Indeed. These should be reversed. We are also adding support for=20 qualifiers to the other sendToTarget signatures. --oren On Nov 3, 2004, at 2:53 PM, John Lister wrote: > I've looked at this in QF1.9.2 but sendtotarget just adds the session=20= > id to=A0the message before passing it to the standard SendToTarget, = this=20 > always fails because of the qualifiers (unless there=A0is=A0another=20 > SendToTarget?) > =A0 > bool Session::sendToTarget( Message& message, const SessionID&=20 > 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=20= > standard SendToTarget=A0extracts the session information and passes = that=20 > to expanded version, eg: > bool Session::sendToTarget( Message& message ) > throw( SessionNotFound ) > { QF_STACK_PUSH(Session::sendToTarget) > try > { > SessionID sessionID =3D message.getSessionID(); > =A0=A0=A0 return sendToTarget( message, sessionID ); > } > catch ( FieldNotFound& ) { throw SessionNotFound(); } > QF_STACK_POP > } > bool Session::sendToTarget( Message& message, const SessionID&=20 > sessionID ) > throw( SessionNotFound ) > { QF_STACK_PUSH(Session::sendToTarget) > message.setSessionID( sessionID ); > Session* pSession =3D lookupSession( sessionID ); > if ( !pSession ) throw SessionNotFound(); > return result =3D pSession->send( message ); > QF_STACK_POP > } > > before i changed my code i wanted to make sure that nothing else would=20= > be broken when using qualifiers. > =A0 > =A0 > ----- 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.=A0 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=20 > qualifier > > and fails. Has anyone else encountered this? > >=A0 > > Thanks > |