summaryrefslogtreecommitdiff
authorkorovkin <korovkin>2006-03-19 14:42:34 (UTC)
committer korovkin <korovkin>2006-03-19 14:42:34 (UTC)
commitadbd8bde1b0b24e5ea7047dea7228451964ac23a (patch) (side-by-side diff)
tree761e7695e2c88ae2ac40d9b4e4adeff7d931cddc
parent3b671ecea335b81c65ec03ad70fa3f25e9bb0a3e (diff)
downloadopie-adbd8bde1b0b24e5ea7047dea7228451964ac23a.zip
opie-adbd8bde1b0b24e5ea7047dea7228451964ac23a.tar.gz
opie-adbd8bde1b0b24e5ea7047dea7228451964ac23a.tar.bz2
We scan ports prior to scanning names.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/parser.cc22
1 files changed, 10 insertions, 12 deletions
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
@@ -157,4 +157,13 @@ bool Parser::parseProtocol( const QString& str) {
+ }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;
@@ -169,13 +178,2 @@ bool Parser::parseProtocol( const QString& str) {
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 ) {