Re: [Quickfix-developers] Strange logic in ThreadedSocketAcceptor::onInitialize()
Brought to you by:
orenmnero
From: Peter P. <pet...@ho...> - 2008-12-10 02:48:45
|
I agree, but I thought that I would ask the first question just in case I was missing something subtle in the QF logic! Thanks, Dan > Date: Mon, 8 Dec 2008 06:10:51 -0800 > From: jt...@ya... > Subject: Re: [Quickfix-developers] Strange logic in ThreadedSocketAcceptor::onInitialize() > To: pet...@ho...; qui...@li... > > I feel the same. > > Since the test was performed against the session, I think the get should also be against the session as well. You get a exception thrown when it is not set in default. > > Also, I believe the setting in session is to override the setting in default. The current implementation doesn't seem to be doing that by going to default. > std::set<SessionID> sessions = s.getSessions(); > std::set<SessionID>::iterator i = sessions.begin(); > { > Dictionary settings = s.get( *i );for( ; i != sessions.end(); ++i ) reuseAddress = s.get().getBool( SOCKET_REUSE_ADDRESS ); > } > > > > ----- Original Message ---- > From: Peter Piper <pet...@ho...> > To: qui...@li... > Sent: Friday, December 5, 2008 11:28:13 AM > Subject: [Quickfix-developers] Strange logic in ThreadedSocketAcceptor::onInitialize() > > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > ThreadedSocketAcceptor::onInitialize() contains the following code: > > if( settings.has( SOCKET_REUSE_ADDRESS ) ) > reuseAddress = s.get().getBool( SOCKET_REUSE_ADDRESS ); > > which is throwing an exception on my system because the SOCKET_REUSE_ADDRESS entry is present in the session configuration (and therefore the if() clause is true) but is not present in the DEFAULTS configuration (and therefore the assignment fails and throws a FIX::ConfigError exception). > > I'm not familiar with the internals of Quickfix but this looks like a strange piece of logic to me. Why is the function testing the dictionary for the session settings but getting the value from the defaults? > > Dan > > > ________________________________ > Get Windows Live Messenger on your Mobile. Click Here! if( settings.has( SOCKET_REUSE_ADDRESS ) )// reuseAddress = s.get(*i).getBool( SOCKET_REUSE_ADDRESS );Jiryih Tsaur > > > _________________________________________________________________ Are you a PC? Upload your PC story and show the world http://clk.atdmt.com/UKM/go/122465942/direct/01/ |