mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rt: fix warning when xdg-desktop-portal isn't running
$ pipewire ... [W][1234.001] mod.rt | [ module-rt.c: 278 pw_rtkit_check_xdg_portal()] Can't find xdg-portal: (null) ...
This commit is contained in:
		
							parent
							
								
									b2f43e7bad
								
							
						
					
					
						commit
						6d58c73937
					
				
					 1 changed files with 4 additions and 12 deletions
				
			
		| 
						 | 
					@ -269,20 +269,12 @@ struct pw_rtkit_bus *pw_rtkit_bus_get_session(void)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
 | 
					bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	DBusError error;
 | 
						if (!dbus_bus_name_has_owner(system_bus->bus, XDG_PORTAL_SERVICE_NAME, NULL)) {
 | 
				
			||||||
        bool ret = true;
 | 
							pw_log_warn("Can't find %s. Is xdg-desktop-portal running?", XDG_PORTAL_SERVICE_NAME);
 | 
				
			||||||
 | 
							return false;
 | 
				
			||||||
	dbus_error_init(&error);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (!dbus_bus_name_has_owner(system_bus->bus, XDG_PORTAL_SERVICE_NAME, &error)) {
 | 
					 | 
				
			||||||
		pw_log_warn("Can't find xdg-portal: %s", error.name);
 | 
					 | 
				
			||||||
		ret = false;
 | 
					 | 
				
			||||||
		goto finish;
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
finish:
 | 
					 | 
				
			||||||
	dbus_error_free(&error);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return ret;
 | 
						return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
 | 
					void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue