summaryrefslogtreecommitdiff
Unidiff
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
@@ -155,8 +155,17 @@ bool Parser::parseProtocol( const QString& str) {
155 m_protocolAdded = false; 155 m_protocolAdded = false;
156 return true; 156 return true;
157 157
158 }else if (m_protocolOver && str.startsWith(" ") ) {
159 m_protocolAdded = true;
160 QString dummy = str.stripWhiteSpace();
161 int pos = dummy.findRev(':');
162 if ( pos > -1 ) {
163 int port = dummy.mid(pos+1 ).stripWhiteSpace().toInt();
164 Services::ProtocolDescriptor desc( m_protName, m_protId, port );
165 m_item.insertProtocolDescriptor( desc );
166 }
167 return true;
158 }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) 168 }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100)
159 owarn << "double protocol filter" << oendl;
160 169
161 if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now 170 if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now
162 Services::ProtocolDescriptor desc( m_protName, m_protId ); 171 Services::ProtocolDescriptor desc( m_protName, m_protId );
@@ -167,17 +176,6 @@ bool Parser::parseProtocol( const QString& str) {
167 m_protId = convert(str, m_protName ); 176 m_protId = convert(str, m_protName );
168 } 177 }
169 return true; 178 return true;
170 }else if (m_protocolOver && str.startsWith(" ") ) {
171 owarn << "tripple protocol filter" << oendl;
172 m_protocolAdded = true;
173 QString dummy = str.stripWhiteSpace();
174 int pos = dummy.findRev(':');
175 if ( pos > -1 ) {
176 int port = dummy.mid(pos+1 ).stripWhiteSpace().toInt();
177 Services::ProtocolDescriptor desc( m_protName, m_protId, port );
178 m_item.insertProtocolDescriptor( desc );
179 }
180 return true;
181 }else if (m_protocolOver ) { 179 }else if (m_protocolOver ) {
182 m_protocolOver = false; 180 m_protocolOver = false;
183 } 181 }