mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: add context listener last
Add if after we have done everything else because if there is an error we don't remove it and there will be an invalid hook registered in the context.
This commit is contained in:
		
							parent
							
								
									22bb2666c4
								
							
						
					
					
						commit
						f43c57afdb
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -6665,9 +6665,6 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
 | 
				
			||||||
	spa_list_init(&impl->cleanup_clients);
 | 
						spa_list_init(&impl->cleanup_clients);
 | 
				
			||||||
	spa_list_init(&impl->free_messages);
 | 
						spa_list_init(&impl->free_messages);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_context_add_listener(context, &impl->context_listener,
 | 
					 | 
				
			||||||
			&context_events, impl);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	str = pw_properties_get(props, "server.address");
 | 
						str = pw_properties_get(props, "server.address");
 | 
				
			||||||
	if (str == NULL) {
 | 
						if (str == NULL) {
 | 
				
			||||||
		pw_properties_setf(props, "server.address",
 | 
							pw_properties_setf(props, "server.address",
 | 
				
			||||||
| 
						 | 
					@ -6690,6 +6687,8 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context,
 | 
				
			||||||
		pw_log_warn(NAME" %p: can't create pid file: %s",
 | 
							pw_log_warn(NAME" %p: can't create pid file: %s",
 | 
				
			||||||
			    impl, spa_strerror(res));
 | 
								    impl, spa_strerror(res));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						pw_context_add_listener(context, &impl->context_listener,
 | 
				
			||||||
 | 
								&context_events, impl);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	impl->dbus_name = dbus_request_name(context, "org.pulseaudio.Server");
 | 
						impl->dbus_name = dbus_request_name(context, "org.pulseaudio.Server");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue