mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	add new "disable-shm" option to client.conf
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1284 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									206ac6f3ee
								
							
						
					
					
						commit
						d785b8fa87
					
				
					 3 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -62,6 +62,7 @@ static const pa_client_conf default_conf = {
 | 
			
		|||
    .default_source = NULL,
 | 
			
		||||
    .default_server = NULL,
 | 
			
		||||
    .autospawn = 0,
 | 
			
		||||
    .disable_shm = 0,
 | 
			
		||||
    .cookie_file = NULL,
 | 
			
		||||
    .cookie_valid = 0,
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -100,6 +101,7 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
 | 
			
		|||
        { "default-server",         pa_config_parse_string,  NULL },
 | 
			
		||||
        { "autospawn",              pa_config_parse_bool,    NULL },
 | 
			
		||||
        { "cookie-file",            pa_config_parse_string,  NULL },
 | 
			
		||||
        { "disable-shm",            pa_config_parse_bool,    NULL },
 | 
			
		||||
        { NULL,                     NULL,                    NULL },
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -110,6 +112,7 @@ int pa_client_conf_load(pa_client_conf *c, const char *filename) {
 | 
			
		|||
    table[4].data = &c->default_server;
 | 
			
		||||
    table[5].data = &c->autospawn;
 | 
			
		||||
    table[6].data = &c->cookie_file;
 | 
			
		||||
    table[7].data = &c->disable_shm;
 | 
			
		||||
 | 
			
		||||
    f = filename ?
 | 
			
		||||
        fopen((fn = pa_xstrdup(filename)), "r") :
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,7 +28,7 @@
 | 
			
		|||
 | 
			
		||||
typedef struct pa_client_conf {
 | 
			
		||||
    char *daemon_binary, *extra_arguments, *default_sink, *default_source, *default_server, *cookie_file;
 | 
			
		||||
    int autospawn;
 | 
			
		||||
    int autospawn, disable_shm;
 | 
			
		||||
    uint8_t cookie[PA_NATIVE_COOKIE_LENGTH];
 | 
			
		||||
    int cookie_valid; /* non-zero, when cookie is valid */
 | 
			
		||||
} pa_client_conf;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,7 +128,6 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
 | 
			
		|||
    c->subscribe_callback = NULL;
 | 
			
		||||
    c->subscribe_userdata = NULL;
 | 
			
		||||
 | 
			
		||||
    c->mempool = pa_mempool_new(1);
 | 
			
		||||
    c->is_local = -1;
 | 
			
		||||
    c->server_list = NULL;
 | 
			
		||||
    c->server = NULL;
 | 
			
		||||
| 
						 | 
				
			
			@ -149,6 +148,8 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
 | 
			
		|||
#endif
 | 
			
		||||
    pa_client_conf_env(c->conf);
 | 
			
		||||
 | 
			
		||||
    c->mempool = pa_mempool_new(!c->conf->disable_shm);
 | 
			
		||||
 | 
			
		||||
    return c;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue