Oops - when adding a sequence header to the SDP response, the size value needs to be cleared, not the buffer pointer.
This commit is contained in:
		
							parent
							
								
									92bebc457f
								
							
						
					
					
						commit
						58a0ee67a3
					
				
					 3 changed files with 11 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -224,6 +224,9 @@ static void ServiceDiscovery_ProcessServiceSearchAttribute(SDP_PDUHeader_t* SDPH
 | 
			
		|||
	ResponsePacket.SDPHeader.TransactionID   = SDPHeader->TransactionID;
 | 
			
		||||
	ResponsePacket.SDPHeader.ParameterLength = (ResponsePacket.AttributeListByteCount + sizeof(ResponsePacket.AttributeListByteCount));
 | 
			
		||||
 | 
			
		||||
	BT_SDP_DEBUG(1, ">> Service Search Attribute Response");
 | 
			
		||||
	BT_SDP_DEBUG(2, "-- Total Parameter Length: 0x%04X", ResponsePacket.SDPHeader.ParameterLength);
 | 
			
		||||
 | 
			
		||||
	Bluetooth_SendPacket(&ResponsePacket, (sizeof(ResponsePacket.SDPHeader) + ResponsePacket.SDPHeader.ParameterLength),
 | 
			
		||||
	                     Channel);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -120,10 +120,9 @@
 | 
			
		|||
			*BufferPos += 1;
 | 
			
		||||
 | 
			
		||||
			uint16_t* SizePos = (uint16_t*)*BufferPos;				
 | 
			
		||||
			*SizePos = 0;
 | 
			
		||||
 | 
			
		||||
			**BufferPos += 2;
 | 
			
		||||
			*BufferPos += 2;
 | 
			
		||||
			
 | 
			
		||||
			*SizePos = 0;
 | 
			
		||||
			return SizePos;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue