mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	move device volume file to state dir
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2479 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									9f86d0f543
								
							
						
					
					
						commit
						6be0c7526c
					
				
					 1 changed files with 6 additions and 5 deletions
				
			
		| 
						 | 
					@ -263,7 +263,7 @@ static pa_hook_result_t source_fixate_hook_callback(pa_core *c, pa_source_new_da
 | 
				
			||||||
int pa__init(pa_module*m) {
 | 
					int pa__init(pa_module*m) {
 | 
				
			||||||
    pa_modargs *ma = NULL;
 | 
					    pa_modargs *ma = NULL;
 | 
				
			||||||
    struct userdata *u;
 | 
					    struct userdata *u;
 | 
				
			||||||
    char *fname, *runtime_dir;
 | 
					    char *fname, *fn;
 | 
				
			||||||
    char hn[256];
 | 
					    char hn[256];
 | 
				
			||||||
    pa_sink *sink;
 | 
					    pa_sink *sink;
 | 
				
			||||||
    pa_source *source;
 | 
					    pa_source *source;
 | 
				
			||||||
| 
						 | 
					@ -290,11 +290,12 @@ int pa__init(pa_module*m) {
 | 
				
			||||||
    if (!pa_get_host_name(hn, sizeof(hn)))
 | 
					    if (!pa_get_host_name(hn, sizeof(hn)))
 | 
				
			||||||
        goto fail;
 | 
					        goto fail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!(runtime_dir = pa_get_runtime_dir()))
 | 
					    fn = pa_sprintf_malloc("device-volumes.%s.gdbm", hn);
 | 
				
			||||||
        goto fail;
 | 
					    fname = pa_state_path(fn);
 | 
				
			||||||
 | 
					    pa_xfree(fn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    fname = pa_sprintf_malloc("%s/device-volumes.%s.gdbm", runtime_dir, hn);
 | 
					    if (!fname)
 | 
				
			||||||
    pa_xfree(runtime_dir);
 | 
					        goto fail;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
 | 
					    if (!(u->gdbm_file = gdbm_open(fname, 0, GDBM_WRCREAT, 0600, NULL))) {
 | 
				
			||||||
        pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
 | 
					        pa_log("Failed to open volume database '%s': %s", fname, gdbm_strerror(gdbm_errno));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue