summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulse/client-conf.c3
-rw-r--r--src/pulse/client-conf.h2
-rw-r--r--src/pulse/context.c3
3 files changed, 6 insertions, 2 deletions
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index 619b11c3..5cd7e3ed 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
@@ -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") :
diff --git a/src/pulse/client-conf.h b/src/pulse/client-conf.h
index a532f0df..35728aeb 100644
--- a/src/pulse/client-conf.h
+++ b/src/pulse/client-conf.h
@@ -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;
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 55b49a79..b4641590 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -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;
}