mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-10-29 05:40:23 -04:00 
			
		
		
		
	log: Fix thread name printing
Not all threads have a name. Thanks to Pierre Ossman for the patch.
This commit is contained in:
		
							parent
							
								
									ada83601f0
								
							
						
					
					
						commit
						d90d99bd38
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -363,9 +363,11 @@ void pa_log_levelv_meta( | |||
|     pa_vsnprintf(text, sizeof(text), format, ap); | ||||
| 
 | ||||
|     if ((_flags & PA_LOG_PRINT_META) && file && line > 0 && func) | ||||
|         pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ", pa_thread_get_name(pa_thread_self()), file, line, func); | ||||
|         pa_snprintf(location, sizeof(location), "[%s][%s:%i %s()] ", | ||||
|                     pa_strnull(pa_thread_get_name(pa_thread_self())), file, line, func); | ||||
|     else if ((_flags & (PA_LOG_PRINT_META|PA_LOG_PRINT_FILE)) && file) | ||||
|         pa_snprintf(location, sizeof(location), "[%s] %s: ", pa_thread_get_name(pa_thread_self()), pa_path_get_filename(file)); | ||||
|         pa_snprintf(location, sizeof(location), "[%s] %s: ", | ||||
|                     pa_strnull(pa_thread_get_name(pa_thread_self())), pa_path_get_filename(file)); | ||||
|     else | ||||
|         location[0] = 0; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tanu Kaskinen
						Tanu Kaskinen