Changeset 374 for asp3_tinet_ecnl_arm/trunk/btstack/src/sdp_client.c
- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/btstack/src/sdp_client.c
r352 r374 151 151 static void parse_service_search_attribute_response(uint8_t* packet){ 152 152 uint16_t offset = 3; 153 uint16_t parameterLength = READ_NET_16(packet,offset);153 uint16_t parameterLength = big_endian_read_16(packet,offset); 154 154 uint16_t attributeListByteCount; 155 155 offset+=2; 156 156 // AttributeListByteCount <= mtu 157 attributeListByteCount = READ_NET_16(packet,offset);157 attributeListByteCount = big_endian_read_16(packet,offset); 158 158 offset+=2; 159 159 … … 185 185 // uint16_t handle; 186 186 if (packet_type == L2CAP_DATA_PACKET){ 187 uint16_t responseTransactionID = READ_NET_16(packet,1);187 uint16_t responseTransactionID = big_endian_read_16(packet,1); 188 188 if ( responseTransactionID != transactionID){ 189 189 log_error("Missmatching transaction ID, expected %u, found %u.", transactionID, responseTransactionID); … … 247 247 } 248 248 sdp_cid = channel; 249 mtu = READ_BT_16(packet, 17);250 // handle = READ_BT_16(packet, 9);249 mtu = little_endian_read_16(packet, 17); 250 // handle = little_endian_read_16(packet, 9); 251 251 log_info("SDP Client Connected, cid %x, mtu %u.", sdp_cid, mtu); 252 252 … … 261 261 case L2CAP_EVENT_CHANNEL_CLOSED: { 262 262 uint8_t status; 263 if (sdp_cid != READ_BT_16(packet, 2)) {264 // log_info("Received L2CAP_EVENT_CHANNEL_CLOSED for cid %x, current cid %x\n", READ_BT_16(packet, 2),sdp_cid);263 if (sdp_cid != little_endian_read_16(packet, 2)) { 264 // log_info("Received L2CAP_EVENT_CHANNEL_CLOSED for cid %x, current cid %x\n", little_endian_read_16(packet, 2),sdp_cid); 265 265 break; 266 266 } … … 402 402 static void parse_service_search_response(uint8_t* packet){ 403 403 uint16_t offset = 3; 404 uint16_t parameterLength = READ_NET_16(packet,offset);404 uint16_t parameterLength = big_endian_read_16(packet,offset); 405 405 uint16_t totalServiceRecordCount; 406 406 uint16_t currentServiceRecordCount; 407 407 offset+=2; 408 408 409 totalServiceRecordCount = READ_NET_16(packet,offset);410 offset+=2; 411 412 currentServiceRecordCount = READ_NET_16(packet,offset);409 totalServiceRecordCount = big_endian_read_16(packet,offset); 410 offset+=2; 411 412 currentServiceRecordCount = big_endian_read_16(packet,offset); 413 413 offset+=2; 414 414 if (currentServiceRecordCount > totalServiceRecordCount){ … … 436 436 static void parse_service_attribute_response(uint8_t* packet){ 437 437 uint16_t offset = 3; 438 uint16_t parameterLength = READ_NET_16(packet,offset);438 uint16_t parameterLength = big_endian_read_16(packet,offset); 439 439 uint16_t attributeListByteCount; 440 440 offset+=2; 441 441 442 442 // AttributeListByteCount <= mtu 443 attributeListByteCount = READ_NET_16(packet,offset);443 attributeListByteCount = big_endian_read_16(packet,offset); 444 444 offset+=2; 445 445
Note:
See TracChangeset
for help on using the changeset viewer.