From adbd8bde1b0b24e5ea7047dea7228451964ac23a Mon Sep 17 00:00:00 2001 From: korovkin Date: Sun, 19 Mar 2006 14:42:34 +0000 Subject: We scan ports prior to scanning names. --- (limited to 'noncore') diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc index 7e95907..d20b9f3 100644 --- a/noncore/net/opietooth/lib/parser.cc +++ b/noncore/net/opietooth/lib/parser.cc @@ -155,8 +155,17 @@ bool Parser::parseProtocol( const QString& str) { m_protocolAdded = false; return true; + }else if (m_protocolOver && str.startsWith(" ") ) { + m_protocolAdded = true; + QString dummy = str.stripWhiteSpace(); + int pos = dummy.findRev(':'); + if ( pos > -1 ) { + int port = dummy.mid(pos+1 ).stripWhiteSpace().toInt(); + Services::ProtocolDescriptor desc( m_protName, m_protId, port ); + m_item.insertProtocolDescriptor( desc ); + } + return true; }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) - owarn << "double protocol filter" << oendl; if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now Services::ProtocolDescriptor desc( m_protName, m_protId ); @@ -167,17 +176,6 @@ bool Parser::parseProtocol( const QString& str) { m_protId = convert(str, m_protName ); } return true; - }else if (m_protocolOver && str.startsWith(" ") ) { - owarn << "tripple protocol filter" << oendl; - m_protocolAdded = true; - QString dummy = str.stripWhiteSpace(); - int pos = dummy.findRev(':'); - if ( pos > -1 ) { - int port = dummy.mid(pos+1 ).stripWhiteSpace().toInt(); - Services::ProtocolDescriptor desc( m_protName, m_protId, port ); - m_item.insertProtocolDescriptor( desc ); - } - return true; }else if (m_protocolOver ) { m_protocolOver = false; } -- cgit v0.9.0.2