mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	bluez5: backend-hsphfpd: Fix transport release on disconnection
Release transport when endpoint connection property is updated to false. This also checks if the transport is already created when receiving endpoint properties update to prevent multiple transport creation.
This commit is contained in:
		
							parent
							
								
									51b6c2cbd7
								
							
						
					
					
						commit
						7c84b1251d
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		| 
						 | 
					@ -1009,6 +1009,17 @@ static DBusHandlerResult hsphfpd_parse_endpoint_properties(struct spa_bt_backend
 | 
				
			||||||
		return DBUS_HANDLER_RESULT_HANDLED;
 | 
							return DBUS_HANDLER_RESULT_HANDLED;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if ((t = spa_bt_transport_find(backend->monitor, endpoint->path)) != NULL) {
 | 
				
			||||||
 | 
							if (!endpoint->connected) {
 | 
				
			||||||
 | 
								spa_bt_transport_free(t);
 | 
				
			||||||
 | 
								spa_bt_device_check_profiles(d, false);
 | 
				
			||||||
 | 
								spa_log_debug(backend->log, "Transport released for %s", endpoint->path);
 | 
				
			||||||
 | 
							} else
 | 
				
			||||||
 | 
								spa_log_debug(backend->log, "Transport already configured for %s", endpoint->path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							return DBUS_HANDLER_RESULT_HANDLED;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!endpoint->valid || !endpoint->connected)
 | 
						if (!endpoint->valid || !endpoint->connected)
 | 
				
			||||||
		return DBUS_HANDLER_RESULT_HANDLED;
 | 
							return DBUS_HANDLER_RESULT_HANDLED;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue