[Quickfix-developers] Fix forSessionID::fromString
Brought to you by:
orenmnero
From: Emil V. <que...@ho...> - 2005-03-30 14:12:42
|
Hi Oren, here is a small fix for the parsing of the session ID string - basically if the senderCompID had a dash inside, the SenderCompID ended there, and not on the ->. (this is from 1.9.4) Emil void fromString( const std::string& str ) { std::string::size_type first = str.find_first_of(':'); std::string::size_type second = str.find("->"); std::string::size_type third = str.find_last_of(':'); if( first == std::string::npos ) return; if( second == std::string::npos ) return; m_beginString = str.substr(0, first); m_senderCompID = str.substr(first+1, second - first - 1); if( first == third ) { m_targetCompID = str.substr(second+2); m_sessionQualifier = ""; } else { m_targetCompID = str.substr(second+2, third - second - 2); m_sessionQualifier = str.substr(third+1); } } _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |