mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	store load_once flag for module
This commit is contained in:
		
							parent
							
								
									114f290be7
								
							
						
					
					
						commit
						9bfd67f70f
					
				
					 2 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -76,6 +76,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
 | 
			
		|||
    m = pa_xnew(pa_module, 1);
 | 
			
		||||
    m->name = pa_xstrdup(name);
 | 
			
		||||
    m->argument = pa_xstrdup(argument);
 | 
			
		||||
    m->load_once = FALSE;
 | 
			
		||||
 | 
			
		||||
    if (!(m->dl = lt_dlopenext(name))) {
 | 
			
		||||
        pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
 | 
			
		||||
| 
						 | 
				
			
			@ -84,7 +85,9 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
 | 
			
		|||
 | 
			
		||||
    if ((load_once = (pa_bool_t (*)(void)) pa_load_sym(m->dl, name, PA_SYMBOL_LOAD_ONCE))) {
 | 
			
		||||
 | 
			
		||||
        if (load_once() && c->modules) {
 | 
			
		||||
        m->load_once = load_once();
 | 
			
		||||
 | 
			
		||||
        if (m->load_once && c->modules) {
 | 
			
		||||
            pa_module *i;
 | 
			
		||||
            uint32_t idx;
 | 
			
		||||
            /* OK, the module only wants to be loaded once, let's make sure it is */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue