Re: [Quickfix-developers] Strange logic in ThreadedSocketAcceptor::onInitialize()
Brought to you by:
orenmnero
From: Jiryih T. <jt...@ya...> - 2008-12-08 14:10:55
|
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 |