mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: require adapter before profile connect & after
All exposed bluez devices should have an adapter specified at all times. Adapter-less devices appear in some race conditions in BlueZ interface. Require device has non-null adapter, in all cases before adding any profiles (which exposes the device), and reject BlueZ profile connection attempts in that state. If an adapter gets removed by BlueZ, remove also all its devices, so that device->adapter pointers stay valid.
This commit is contained in:
		
							parent
							
								
									870cd0136a
								
							
						
					
					
						commit
						f2630ed6fc
					
				
					 4 changed files with 14 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1088,7 +1088,7 @@ static DBusHandlerResult hsphfpd_parse_endpoint_properties(struct impl *backend,
 | 
			
		|||
	}
 | 
			
		||||
 | 
			
		||||
	d = spa_bt_device_find_by_address(backend->monitor, endpoint->remote_address, endpoint->local_address);
 | 
			
		||||
	if (!d) {
 | 
			
		||||
	if (!d || !d->adapter) {
 | 
			
		||||
		spa_log_debug(backend->log, "No device for %s", endpoint->path);
 | 
			
		||||
		return DBUS_HANDLER_RESULT_HANDLED;
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue