mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: support: log: always set spa_log_topic::has_custom_level
				
					
				
			Always set `spa_log_topic::has_custom_level` so that things work out as expected even if it is reinitialized or similar.
This commit is contained in:
		
							parent
							
								
									03901dec2c
								
							
						
					
					
						commit
						96a280497d
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -22,6 +22,7 @@ support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_lev
 | 
			
		|||
		       struct spa_log_topic *t)
 | 
			
		||||
{
 | 
			
		||||
	enum spa_log_level level = default_level;
 | 
			
		||||
	bool has_custom_level = false;
 | 
			
		||||
	const char *topic = t->topic;
 | 
			
		||||
	struct support_log_pattern *pattern;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -29,10 +30,11 @@ support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_lev
 | 
			
		|||
		if (fnmatch(pattern->pattern, topic, 0) != 0)
 | 
			
		||||
			continue;
 | 
			
		||||
		level = pattern->level;
 | 
			
		||||
		t->has_custom_level = true;
 | 
			
		||||
		has_custom_level = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	t->level = level;
 | 
			
		||||
	t->has_custom_level = has_custom_level;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue