Diffstat (limited to 'noncore/net/opietooth/lib/parser.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/lib/parser.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/noncore/net/opietooth/lib/parser.cc b/noncore/net/opietooth/lib/parser.cc index 00ec84a..0699309 100644 --- a/noncore/net/opietooth/lib/parser.cc +++ b/noncore/net/opietooth/lib/parser.cc | |||
@@ -111,42 +111,40 @@ bool Parser::parseRecHandle( const QString& str) { | |||
111 | m_complete = false; | 111 | m_complete = false; |
112 | qWarning("rec handle %d", value); | 112 | qWarning("rec handle %d", value); |
113 | m_item.setRecHandle( value ); | 113 | m_item.setRecHandle( value ); |
114 | return true; | 114 | return true; |
115 | 115 | ||
116 | } | 116 | } |
117 | return false; | 117 | return false; |
118 | } | 118 | } |
119 | bool Parser::parseClassId( const QString& str) { | 119 | bool Parser::parseClassId( const QString& str) { |
120 | if (str.startsWith("Service Class ID List:") ) { | 120 | if (str.startsWith("Service Class ID List:") ) { |
121 | m_classOver = true; | 121 | m_classOver = true; |
122 | return true; | 122 | return true; |
123 | }else if ( m_classOver ) { // ok now are the informations in place | 123 | }else if ( m_classOver && str.startsWith(" " ) ){ // ok now are the informations in place |
124 | 124 | ||
125 | m_classOver = false; | ||
126 | 125 | ||
127 | // "Obex Object Push" (0x1105) | 126 | // "Obex Object Push" (0x1105) |
128 | // find backwards the " and the from 0 to pos and the mid pos+1 | 127 | // find backwards the " and the from 0 to pos and the mid pos+1 |
129 | // then stripWhiteSpace add name replace '"' with "" | 128 | // then stripWhiteSpace add name replace '"' with "" |
130 | // and then convert 0x1105 toInt() | 129 | // and then convert 0x1105 toInt() |
131 | QString classes; | 130 | QString classes; |
132 | int ids; | 131 | int ids; |
133 | ids = convert( str, classes ); | 132 | ids = convert( str, classes ); |
134 | qWarning("ids %d", ids ); | 133 | qWarning("ids %d", ids ); |
135 | m_item.setClassIdList( classes ); | 134 | m_item.insertClassId( ids, classes ); |
136 | m_item.setClassIdList( ids ); | ||
137 | 135 | ||
138 | return true; | 136 | return true; |
139 | }else | 137 | }else |
140 | m_classOver = true; | 138 | m_classOver = false; |
141 | return false; | 139 | return false; |
142 | } | 140 | } |
143 | bool Parser::parseProtocol( const QString& str) { | 141 | bool Parser::parseProtocol( const QString& str) { |
144 | if (str.startsWith("Protocol Descriptor List:") ) { | 142 | if (str.startsWith("Protocol Descriptor List:") ) { |
145 | m_protocolOver = true; | 143 | m_protocolOver = true; |
146 | m_protocolAdded = false; | 144 | m_protocolAdded = false; |
147 | return true; | 145 | return true; |
148 | 146 | ||
149 | }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) | 147 | }else if (m_protocolOver && str.startsWith(" ") ) { // "L2CAP" (0x0100) |
150 | qWarning("double protocol filter"); | 148 | qWarning("double protocol filter"); |
151 | 149 | ||
152 | if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now | 150 | if (!m_protocolAdded ) { // the protocol does neither supply a channel nor port so add it now |