mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	bluez5: improve error messages when connection drops
Log something less confusing when connection to remote device drops unexpectedly. Silence logging transport Release() error in cases where the transport was simultaneously deleted.
This commit is contained in:
		
							parent
							
								
									4625f7ee3a
								
							
						
					
					
						commit
						8277bf6b36
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		|  | @ -4143,6 +4143,11 @@ release: | ||||||
| 			 */ | 			 */ | ||||||
| 			spa_log_debug(monitor->log, "Failed to release idle transport %s: %s", | 			spa_log_debug(monitor->log, "Failed to release idle transport %s: %s", | ||||||
| 			              transport->path, err.message); | 			              transport->path, err.message); | ||||||
|  | 		} else if (spa_streq(err.name, DBUS_ERROR_UNKNOWN_METHOD) || | ||||||
|  | 				spa_streq(err.name, DBUS_ERROR_UNKNOWN_OBJECT)) { | ||||||
|  | 			/* Transport disappeared */ | ||||||
|  | 			spa_log_debug(monitor->log, "Failed to release (gone) transport %s: %s", | ||||||
|  | 			              transport->path, err.message); | ||||||
| 		} else { | 		} else { | ||||||
| 			spa_log_error(monitor->log, "Failed to release transport %s: %s", | 			spa_log_error(monitor->log, "Failed to release transport %s: %s", | ||||||
| 			              transport->path, err.message); | 			              transport->path, err.message); | ||||||
|  |  | ||||||
|  | @ -1300,7 +1300,8 @@ static void media_on_flush_error(struct spa_source *source) | ||||||
| 	spa_log_trace(this->log, "%p: flush event", this); | 	spa_log_trace(this->log, "%p: flush event", this); | ||||||
| 
 | 
 | ||||||
| 	if (source->rmask & (SPA_IO_HUP | SPA_IO_ERR)) { | 	if (source->rmask & (SPA_IO_HUP | SPA_IO_ERR)) { | ||||||
| 		spa_log_warn(this->log, "%p: error %d", this, source->rmask); | 		spa_log_warn(this->log, "%p: connection (%s) terminated unexpectedly", | ||||||
|  | 				this, this->transport ? this->transport->path : ""); | ||||||
| 		if (this->flush_source.loop) { | 		if (this->flush_source.loop) { | ||||||
| 			spa_bt_latency_flush(&this->tx_latency, this->flush_source.fd, this->log); | 			spa_bt_latency_flush(&this->tx_latency, this->flush_source.fd, this->log); | ||||||
| 			spa_loop_remove_source(this->data_loop, &this->flush_source); | 			spa_loop_remove_source(this->data_loop, &this->flush_source); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pauli Virtanen
						Pauli Virtanen