mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module: fix registration of modules
Don't fail when protocol-native is already registered.
This commit is contained in:
		
							parent
							
								
									91d54364fc
								
							
						
					
					
						commit
						589e3d977c
					
				
					 10 changed files with 50 additions and 36 deletions
				
			
		| 
						 | 
				
			
			@ -715,6 +715,9 @@ static bool module_init(struct pw_module *module, struct pw_properties *properti
 | 
			
		|||
	const char *val;
 | 
			
		||||
	struct protocol_data *d;
 | 
			
		||||
 | 
			
		||||
	if (pw_core_find_protocol(core, PW_TYPE_PROTOCOL__Native) != NULL)
 | 
			
		||||
		return true;
 | 
			
		||||
 | 
			
		||||
	this = pw_protocol_new(core, PW_TYPE_PROTOCOL__Native, sizeof(struct protocol_data));
 | 
			
		||||
	if (this == NULL)
 | 
			
		||||
		return false;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue